繁体   English   中英

我的SQL查询有什么问题?

[英]What's wrong with my sql query?

INSERT INTO jos_race_calendrier_regional (id, evt_code, evt_date_comp, evt_station, evt_activite, evt_comite, evt_club_num, evt_club_nom, evt_nom, evt_dt, org_nom, org_adresse, org_adresse2, org_adresse3, org_ville, org_site, cont_nom, cont_tel, cont_gsm, cont_fax, cont_mail, epr_codex, epr_date, epr_sexe, epr_regroupement, epr_grille_categorie, epr_categorie, epr_discipline, epr_distance, epr_homologation') VALUES ( '79', 'evt_code', 'evt_date_comp', 'evt_station', 'evt_activite', 'evt_comite', 'evt_club_num', 'evt_club_nom', 'evt_nom', 'evt_dt', 'org_nom', 'org_adresse1', 'org_adresse2', 'org_adresse3', 'org_ville', 'org_site', 'cont_nom', 'cont_tel', 'cont_gsm', 'cont_fax', 'cont_mail', 'epr_codex', 'epr_date', 'epr_sexe', 'epr_regroupement', 'epr_grille_categorie', 'epr_categorie', 'epr_discipline', 'epr_distance_style', 'epr_homologation')

我收到以下错误

#1064-您的SQL语法有误; 检查与您的MySQL服务器版本相对应的手册以在'')附近使用正确的语法VALUES('79','evt_code','evt_date_comp','evt_station','evt_activite','e'在第1行

该错误消息已经告诉您语法错误在哪里(附近),因此您应该再次查看代码以找出自己的问题所在,但是现在我只为您确定字符的正确性。

您在此处的单引号放错了位置:

epr_homologation') VALUES

应该

epr_homologation) VALUES

epr_homologation之后的额外报价:

INSERT INTO jos_race_calendrier_regional (id, evt_code, evt_date_comp, evt_station, evt_activite, evt_comite, evt_club_num, evt_club_nom, evt_nom, evt_dt, org_nom, org_adresse, org_adresse2, org_adresse3, org_ville, org_site, cont_nom, cont_tel, cont_gsm, cont_fax, cont_mail, epr_codex, epr_date, epr_sexe, epr_regroupement, epr_grille_categorie, epr_categorie, epr_discipline, epr_distance, epr_homologation) VALUES ( '79', 'evt_code', 'evt_date_comp', 'evt_station', 'evt_activite', 'evt_comite', 'evt_club_num', 'evt_club_nom', 'evt_nom', 'evt_dt', 'org_nom', 'org_adresse1', 'org_adresse2', 'org_adresse3', 'org_ville', 'org_site', 'cont_nom', 'cont_tel', 'cont_gsm', 'cont_fax', 'cont_mail', 'epr_codex', 'epr_date', 'epr_sexe', 'epr_regroupement', 'epr_grille_categorie', 'epr_categorie', 'epr_discipline', 'epr_distance_style', 'epr_homologation')

另外,如果'id'是一个整数,则不要在其周围加上''

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM