MySQL: select all records from a table using date subtraction.
SELECT tbldata.* FROM tbldata WHERE (tbldata.DateAdded <= DATE_SUB(now(), INTERVAL 3 HOUR));
source: http://www.daniweb.com/web-development/php/threads/448140/time-difference-in-mysql
No comments:
Post a Comment