I must upload a text file to a table in a mysql db.
after connecting to db, i used this query
$query = "LOAD DATA LOCAL INFILE '/path/_file_name' INTO TABLE tableFIELDS TERMINATED BY ';' ENCLOSED BY '"' ESCAPED BY '\' LINES TERMINATED BY '\r\n'";
but it gives me this error:
Parse error: parse error in
/path/file_name.php on line 11
I tried modifing the query sobstituting ENCLOSED BY '"' with ENCLOSED BY '\"'
But an other error appears:
You have an error in your SQL syntax near ''' at line 2
Where is the error??
Many thanks
Andrea