此查询:
INSERT INTO languages(id_639_3,part2B,part2T,part1,scope,language_type,ref_name,comment) VALUES ('aaa','','','','I','L','Ghotuo','');
失败,出现以下错误:
[Illuminate\Database\QueryException]
SQLSTATE[42000]: Syntax error or access violation: 1064 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 'INSERT INTO languages(id_639_3,part2B,part2T,part1,scope,language_type,ref_na' at line 1 (SQL: INSERT INTO languages(id_639_3,part2B,part2T,part1,scope,language_type,ref_name,comment) VALUES ('aaa','','','','I','L','Ghotuo',''))
答案 0 :(得分:0)
INSERT INTO languages (id_639_3,part2B,part2T,part1,scope,language_type,ref_name,comment)
VALUES ('aaa','','','','I','L','Ghotuo','');
为什么不尝试没有'' / null
值?像这样:
INSERT INTO languages (id_639_3,scope,language_type,ref_name)
VALUES ('aaa','I','L','Ghotuo');
要获得更好的错误消息,请将其分成几行。 - 您还希望在table_name和括号内的column_names之间放置一个空格。