使用MySQL命令加载数据Infile [英] Using MySQL Command Load Data Infile
问题描述
当我在我的PHP代码中执行此SQL语句时,我收到错误
" File''.\Address.txt''not found(Errcode:2)"
$ File = addslashes(" .\Address.txt");
$ SQL =" Load Data InFile \"" 。 $文件。 " \"到表地址;
$ result = mysql_query($ SQL)或死(mysql_error());
该文件位于同一目录中我的.PHP文件。
如何为这个文件生成相对地址以便找到它?
我在XP教授上运行..
谢谢......
布鲁斯
< blockquote> File = addslashes(" .\Address.txt");
SQL =" Load Data InFile \"" 。
文件。 " \"到表格地址;
When I execute this SQL statement in my PHP code, I get an error
"File ''.\Address.txt'' not found (Errcode: 2)"
$File = addslashes(".\Address.txt");
$SQL = "Load Data InFile \"" . $File . "\" into table addresses";
$result = mysql_query($SQL) or die(mysql_error());
The file is located in the same directory as my .PHP file.
How do I generate a relative address for this file so that it can be found?
I''m running on XP Prof..
Thanks...
Bruce
File = addslashes(".\Address.txt");
SQL = "Load Data InFile \"" .
File . "\" into table addresses";
这篇关于使用MySQL命令加载数据Infile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!