請教:mysql_query("source ...")報錯的問題 -开发者知识库
//You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'source 1.dat' at line 1
mysql> source 1.dat
ERROR:
Failed to open file '1.dat', error: 2
同樣的SQL,不同的結果,請教何故?已排除環境等原因
8 个解决方案
#1
解決了:
Note that the 'source' command used in the mysql client program is *not* a feature of the server but of the client.
This means that you cannot do
mysql_query('source myfile.sql');
You will get a syntax error. Use LOAD DATA INFILE as an alternative.
Note that the 'source' command used in the mysql client program is *not* a feature of the server but of the client.
This means that you cannot do
mysql_query('source myfile.sql');
You will get a syntax error. Use LOAD DATA INFILE as an alternative.
最佳答案:
本文经用户投稿或网站收集转载,如有侵权请联系本站。
0条回复