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
精彩评论