dennismonsewicz Posted December 23, 2009 Share Posted December 23, 2009 SELECT * FROM tbl_name WHERE DATE_SUB(CURDATE(), INTERVAL -1 DAY) <= date the above sql statement is supposed to select all of the results from the past 24 hours, but when I pull the query I get nothing... any ideas? Quote Link to comment Share on other sites More sharing options...
dennismonsewicz Posted December 24, 2009 Author Share Posted December 24, 2009 ok so I got this working... SELECT * FROM tbl_name WHERE DATE_SUB(NOW(), INTERVAL 24 HOUR) <= date_col but it only selects the entries from today... I need it to pull entries from the past 24 hours... I pull a report every morning around 10am and need to be able to pull results from then and the past twenty four hours Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.