Page 1 of 1

Last 5 minutes of entries

Posted: Wed Jul 27, 2005 5:35 pm
by Todd_Z
In an attempt to deter double posts, I want to select the rows in a

Code: Select all

 db that have been posted in the last 5 minutes, the form is a timestamp(14) i.e. 20050606163000 = june 6 2005 4:30 - anyways - hows it done?

Posted: Wed Jul 27, 2005 5:42 pm
by timvw
http://dev.mysql.com/doc/mysql/en/date- ... tions.html

Code: Select all

SELECT *
FROM table 
WHERE WHERE DATE_SUB(NOW(),INTERVAL 5 MINUTE) <= timestamp

Posted: Wed Jul 27, 2005 5:48 pm
by John Cartwright
Moved to Databases.