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错误,我不明白
您的SQL语法错误; (昵称='1',位置='1',角色='1',yog ='1',兴趣='1',favMoment),查看与您的MySQL服务器版本对应的手册=在行“1”” 3
右括号没有匹配的开括号 – randomThought 2010-08-24 19:43:06
如果这些数字确实是数字,那么它们也不应该放在引号内。 – 2010-08-24 19:49:55
感谢你们大家 下面是工作代码: INSERT INTO'tims'.'pending_profile'('id','nickname','location','role','yog','interests', ('1','1','1','1','','1','1','1','1','1','fav','gainThisYr','futurePlans','bio') VALERES '1','1') ON DUPLICATE KEY UPDATE nickname ='1',location ='1',role ='1',yog ='1',interest ='1',favMoment ='1',gainThisYr ='1',futurePlans ='1',bio ='1' – TechplexEngineer 2010-08-24 19:58:00