MySQL空语法错误1064

时间:2011-01-16 22:37:12

标签: mysql sql mysql-error-1064

我在很多方面执行(通过php,通过phpMyAdmin和通过终端shell中的mysql客户端)查询,此查询:
SELECT id,titolo,luogo,data_ora FROM eventi WHERE data_ora BETWEEN(1293836400 AND 1296428400);
我得到的结果总是一样的:
ERROR 1064 (42000): 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 '' at line 1
我尝试在分割的终端中执行它以获得更好的错误识别,它似乎在中 BETWEEN(1293836400 AND 1296428400);
有谁能告诉我我的查询有什么问题!??

1 个答案:

答案 0 :(得分:2)

尝试删除BETWEEN子句中的括号:

SELECT .... data_ora BETWEEN 1293836400 AND 1296428400