dolan2go
asked on
Between MySQL datetime values?
runTime is datetime type.
Results in:
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 '02:59:00 AND 2011-05-16 03:01:00' at line 1
Results in:
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
SELECT * FROM User WHERE runTime BETWEEN 2011-05-16 03:01:00 AND 2011-05-16 03:01:00
Results in:
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 '02:59:00 AND 2011-05-16 03:01:00' at line 1
SELECT * FROM User WHERE runTime BETWEEN '2011-05-16 03:01:00' AND '2011-05-16 03:01:00'
Results in:
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
A great answer to get right to the point.
Thanks.
Thanks.
ASKER
Solution:
Cut n paste is not always a time saver.