我有这个问题
update user_remember_me set
when='2012-07-06 05:44:27',
hash='c8e9d2c0dd156b5c68d0b048e5daa948e6b8fac7'
where user = '21';
我收到这个错误
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 'when='2012-07-06 05:44:27', hash='c8e9d2c0dd156b5c68d0b048e5daa948e6b8fac7' wher' at line 1
我没有错过这里的连接,我在任何地方都使用过像这样的简单更新,直到现在都没有问题,也许我累了,但这会让我发疯,直到我得到答案
最佳答案
当是mysql中的关键字时,更改列名 或者您可以将其用作
`when`='2012-07-06 05:44:27'
关于MySQL 查询完整性检查,用于更新查询,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11204825/