【发布时间】:2012-07-10 20:37:09
【问题描述】:
我的 SQL 代码有小问题:
UPDATE articles SET like=like+1 WHERE id=1
当我尝试在 PhpMyAdmin 中执行它时,我收到了这个错误:
#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 'like=like+1 WHERE id=1' at line 1
Column like int 默认设置为 0(长度为 11)。 有谁知道我该如何修复它?请帮忙。
【问题讨论】:
-
我认为这是因为
like是保留字。