PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have to send emails exactly 24 hours before an event occurs. The system then waits for 5 minutes then again checks is there any new event within next 24 hours.
First of all you are storing the time and date as 1 value.
Try seperating your date and time values.
Regarding your time checker, as you already know the times of the events, you could base your "checking" script relative to the event's time. So instead of checking every 5 minutes set a pre-determined time that the emails should be sent.
Using a pre-determined time will also save server load.