Hi guys--
Sorry to bother you with what is probably a simple question. I've read through the manual and I'm still not sure of what I'm doing; I'm getting caught in strings vs. numbers, ie, I'm afraid that what I'm trying to do won't work because I'm dealing with strings instead of numbers.
I'm trying to pull rows out of a MySQL table where the date stamp looks like:
2000-12-30 19:22:00
I want to pull all rows that have been placed in the db in the last 24 hours. How can I compare the current date/time to the date stamps in the table?
Ma'am, try
WHERE datetime > Date_sub(Now(), INTERVAL 1 day)
Instead of '1 day' you could use '24 hour'.
Bob Hall
Know thyself? Absurd direction!
Bubbles bear no introspection. -Khushhal Khan Khatak