MYSQL / PHP Newbie question
I'm using MySQL 4.0.14-nt and php4 on a win2000 box running pws. I've noticed from previous posts that importing from textfiles issues are a regular thread. I've tried the fixes used in a number of previous threads to no avail.
When I execute the follwing command from a .php webpage:
$query = "LOAD DATA INFILE 'D:\Profiles\nalmond\Desktop\dates.txt' REPLACE INTO TABLE dates FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\n'";
$result = mysql_query($query) or die ("Invalid DATA LOAD query"
I get an error and the 'or die' error message is diplayed. Other php/MySQL commands such as 'Optimise Table' run OK. The text file is tab delimited, although I have tried it as a CSV also without success.
When I try to import the file via an admin front end, SQLFront, I get the following error:
'ERROR 1148: THE USED COMMAND IS NOT ALLOWED WITH THIS MySQL VERSION'
I've checked that 'Allow use of LOAD DATA LOCAL INFILE' is enabled via MySQL CC.
I've run out of ideas, can anyone help?
I'm using MySQL 4.0.14-nt and php4 on a win2000 box running pws. I've noticed from previous posts that importing from textfiles issues are a regular thread. I've tried the fixes used in a number of previous threads to no avail.
When I execute the follwing command from a .php webpage:
$query = "LOAD DATA INFILE 'D:\Profiles\nalmond\Desktop\dates.txt' REPLACE INTO TABLE dates FIELDS TERMINATED BY '\t' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\n'";
$result = mysql_query($query) or die ("Invalid DATA LOAD query"
I get an error and the 'or die' error message is diplayed. Other php/MySQL commands such as 'Optimise Table' run OK. The text file is tab delimited, although I have tried it as a CSV also without success.
When I try to import the file via an admin front end, SQLFront, I get the following error:
'ERROR 1148: THE USED COMMAND IS NOT ALLOWED WITH THIS MySQL VERSION'
I've checked that 'Allow use of LOAD DATA LOCAL INFILE' is enabled via MySQL CC.
I've run out of ideas, can anyone help?