我有这段代码
LOAD DATA INFILE '$filename' INTO TABLE
{选取列表{1}}
但是当我执行它时,会显示以下错误:
FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
我的SQL查询有什么问题?
答案 0 :(得分:1)
可能你有一个没有转义的“(在附上),但没有看到更多就不可能说。
$sql = "LOAD DATA INFILE '$filename' INTO TABLE `picklist` FIELDS TERMINATED BY ',' ENCLOSED BY '\"' LINES TERMINATED BY '\n'"; // Added the escape character (slash) before the double quotes