开发者

MySQL empty sintax error 1064

开发者 https://www.devze.com 2023-02-04 08:21 出处:网络
I was executing in many ways (via php, via phpMyAdmin and via mysql client in terminal shell) a query, this query:

I was executing in many ways (via php, via phpMyAdmin and via mysql client in terminal shell) a query, this query:

SELECT id,titolo,luogo,data_ora FROM eventi WHERE data_ora BETWEEN(1293836400 AND 1296428400);

And the result i get is always the same:

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

I tried executing it in the terminal splitted for get a better ide开发者_开发问答ntification of the error and it seems to be in

BETWEEN(1293836400 AND 1296428400);

Is there anyone who can tell me what's wrong with my query!??


Try eliminating the brackets from the BETWEEN clause:

SELECT .... data_ora BETWEEN 1293836400 AND 1296428400
0

精彩评论

暂无评论...
验证码 换一张
取 消