I have a date
and time
column in my mysql table called start_date
and start_time
respectively. I want my users the ability to set reminders for themselves to be sent X hours before start_time
, min. 1 hour and max 24 hours.
I'll be running a CRON script to send these reminders. Right now I do:
SELECT * FROM auctions WHERE start_date=CURDATE() AND status='0'
To get all the auctions that will be starting today and haven't yet started. My question is, how can I figure out if the time now is X
hours before start_time
so I can send them a reminder if it is.
Any suggestions at all?