SQL错误,我不明白
INSERT INTO `tims`.`pending_profile`(`id`, `nickname`, `location`, `role`, `yog`, `interests`, `favMoment`, `gainThisYr`, `futurePlans`, `bio`)
VALUES ('1', '1', '1', '1', '', '1', '1', '1', '1', '1')
ON DUPLICATE KEY UPDATE ( nickname ='1', location= '1', role= '1',yog= '1',interests= '1',favMoment= '1',gainThisYr= '1',futurePlans= '1',bio= '1')
是什么触发了这个错误?
您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,了解在 '(nickname='1', location='1', role='1',yog='1',interests='1',favMoment 附近使用的正确语法= '1'' 在第 3 行
INSERT INTO `tims`.`pending_profile`(`id`, `nickname`, `location`, `role`, `yog`, `interests`, `favMoment`, `gainThisYr`, `futurePlans`, `bio`)
VALUES ('1', '1', '1', '1', '', '1', '1', '1', '1', '1')
ON DUPLICATE KEY UPDATE ( nickname ='1', location= '1', role= '1',yog= '1',interests= '1',favMoment= '1',gainThisYr= '1',futurePlans= '1',bio= '1')
What is triggering this error?
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 '( nickname ='1', location= '1', role= '1',yog= '1',interests= '1',favMoment= '1'' at line 3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在字段之间放置逗号:
Put comma's between the fields:
您从未打开括号,并且字段之间需要逗号
You never opened your parentheses and you need commas between the fields
您是否应该使用逗号分隔要在最后一行更新的列列表?
Should you not use commas to separate your list of columns to update on the last line?