My error message is:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘auto” at line 5
My query is:
LOAD DATA LOCAL INFILE 'D:\file.csv'
INTO TABLE `tableName`
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
ESCAPED BY '\'
LINES TERMINATED BY 'auto'
I’m running the query via php function mysql_query();
The problem here is that the query sees an unclosed single quote after defining the escape sequence.
By default, MySQL uses a backslash as the escape character. If you wish to be explicit, I believe you will need to use a double-backslash:
Then, remove the quotes around
'auto'.