alalex
03-21-2012, 03:32 AM
Hello all,
I've searched this forum and google for a while with no luck on this subject. I need to import some files via PHP to my database, so I obviously thought of using LOAD DATA INFILE. Seeing that it was disabled here, I tried using LOCAL, but my script returns http status code 500 (Internal server error) when I use it,
Anyone has any clue as to why this might happen? The exact query looks like:
LOAD DATA LOCAL INFILE '/tmp/facebook/$file' INTO TABLE fbimport FIELDS TERMINATED BY ',' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '';
The $file variable contains the name and extension, no problem there. The path might be wrong, couldn't test it yet
I've searched this forum and google for a while with no luck on this subject. I need to import some files via PHP to my database, so I obviously thought of using LOAD DATA INFILE. Seeing that it was disabled here, I tried using LOCAL, but my script returns http status code 500 (Internal server error) when I use it,
Anyone has any clue as to why this might happen? The exact query looks like:
LOAD DATA LOCAL INFILE '/tmp/facebook/$file' INTO TABLE fbimport FIELDS TERMINATED BY ',' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '';
The $file variable contains the name and extension, no problem there. The path might be wrong, couldn't test it yet