我不能更改表中的数据..数据更新 - SQL语法错误
UPDATE users
SET mem_expire = 2111-10-10 00:00:00
WHERE mem_expire = 0000-00-00 00:00:00;
MySQL错误:
#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 '00:00:00 WHERE mem_expire = 0000-00-00 00:00:00' at line 2
我怎样才能解决这个问题?
什么数据类型是mem_expire? –
引用新日期'mem_expire ='2111-10-10 00:00:00''和旧的。 'WHERE mem_expire ='0000-00-00 00:00:00'; –
[STR_TO_DATE](http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_str-to-date)是最好的方法,为任何日期格式提供灵活性你想使用而不是标准。 –