I want to retrieve all the records from a table which were posted 24 hours back using php mysql. I can able to get last 24 hour inserted records using datetime column. But i want the records which were inserted into table and completed 24 hours from posting.
Please guys help me out!
Assuming that "date" is your datetime column and "mytable" is your table
SELECT * FROM mytable WHERE date <= DATE_SUB(NOW(), INTERVAL 24 HOUR)