我不确定为什么会出现此 mysql 错误。最初我在日期前后没有''。然后我尝试了 ''' 和 '`' 但没有任何运气。怎么了?
SELECT COUNT(user) WHERE user=1 AND pass_time<'2009-09-21 13:44:38';
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 'WHERE user=1 AND pass_time<'2009-09-21 13:44:38''
最佳答案
您需要指定您选择的表格。例如
SELECT COUNT(user) FROM my_table WHERE ...
关于php - 比较日期时的mysql错误(php),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1456475/