Jump to content

LOAD DATA LOCAL INFILE


BilboBoggins

Recommended Posts

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  ???

 

;D

Link to comment
https://forums.phpfreaks.com/topic/48921-load-data-local-infile/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.