MySQL select entries older than
From D3xt3r01.tk
Jump to navigationJump to search
Query
SELECT * FROM `table` WHERE `timestampfield` > subdate(NOW(), INTERVAL 10 MINUTE);
OR
SELECT * FROM `table` where `timestampfield` > NOW() - INTERVAL 10 MINUTE;
That would show you all the entries created in the last 10 minutes .. you can replace 'minute' with hour/day/month/year... ofcourse .. you can also replace the number ..