LOAD DATA LOCAL INFILE........

[expired user #1763]'s profile image [expired user #1763] posted 17 years ago in General Permalink
Hi,

I downloaded HeidiSQL in college to run on the lab machines for my final year project, when i import a csv file with HeidiSQL everything is fine.

Problem is I want to automate this through PHP, but when I use the LOAD DATA LOCAL INFILE command given in HeidiSQL in PHP or directly through the SQL command shell I get an error:
ERROR 1148: The used command is not allowed with this MySQL version

Does anybody know what the problem is?
Is it because HeidiSQL does notshow the full SQL query in the SQL Log and if so how can I find the full query to use in PHP?

Thanks in advance
ansgar's profile image ansgar posted 17 years ago Permalink
You have to run the server with the option "enable-local-infile" if you want to use the LOAD statements:
http://dev.mysql.com/doc/refman/5.0/en/load-data-local.html

Please login to leave a reply, or register at first.