Date/Time Query Help
| From: | Shrout, Ryan | Date: | Tue, 24 Jul 2001 19:09:14 +0000 |
| Subject: | Date/Time Query Help | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-59396@lists.php.net to get a copy of this message | ||
Okay, I need help with this one:
I have a table with a column in the MySQL DATETIME format. (2001-07-24
13:02:02)
I need a MySQL query that will select all the entries in it made within the
last hour.
I tried this, but it is not working correctly, what am I doing wrong?
SELECT *
FROM session
WHERE (session.Date > DATE_SUB(NOW(), INTERVAL 1 HOUR))
Thanks!!!
Ryan Shrout