Back
I am looking for a where clause that can be used to retrieve records for the last 24 hours?
Try using below code:
SELECT * FROM table_nameWHERE table_name.the_date > DATE_SUB(CURDATE(), INTERVAL 1 DAY)
SELECT *
FROM table_name
WHERE table_name.the_date > DATE_SUB(CURDATE(), INTERVAL 1 DAY)
31k questions
32.8k answers
501 comments
693 users