LOAD LOCAL DATA INFILE Aaaahhhhhh!!!
Posted: Fri Apr 27, 2007 6:26 am
Hey all,
SQL Version: MySQL 3.23.49
PHP Version: 4.3.11
Tearing my hair out with this 1. My PHP script was woking perfect until I moved to a different hosting server. When my page loads a PHP script imports the data into a MySQL table.
My code is:
mysql_query('LOAD DATA LOCAL INFILE "counciltotals.csv" INTO TABLE counciltotals FIELDS ENCLOSED BY "\"" TERMINATED BY "," LINES TERMINATED BY "\\r\\n" ;') or die('Error loading data file.<br>' . mysql_error());
The error message im now getting is:
File 'counciltotals.csv' not found (Errcode: 2)
Ive tried changing permissions and Ive also added local-infile=1 to the MySQL config file.
ANy Ideas would be great
SQL Version: MySQL 3.23.49
PHP Version: 4.3.11
Tearing my hair out with this 1. My PHP script was woking perfect until I moved to a different hosting server. When my page loads a PHP script imports the data into a MySQL table.
My code is:
mysql_query('LOAD DATA LOCAL INFILE "counciltotals.csv" INTO TABLE counciltotals FIELDS ENCLOSED BY "\"" TERMINATED BY "," LINES TERMINATED BY "\\r\\n" ;') or die('Error loading data file.<br>' . mysql_error());
The error message im now getting is:
File 'counciltotals.csv' not found (Errcode: 2)
Ive tried changing permissions and Ive also added local-infile=1 to the MySQL config file.
ANy Ideas would be great