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