I have a db of coupons, and when they expire, I'd like to send an email to the customer saying it has expired, create a new one. What is the best way to do this? With a cron each day to check if it just expired? Or is there a good way to do it more "proactively"?
Asked
Active
Viewed 46 times
1 Answers
0
you could use a cron job to run a script that checks for expired entries, and then runs your email functions. But I have a feeling there is a nifty method using functions within you DB - are you using MySQL? Postgre, mssql.... ??
on looking, I think this page might help you: Invoking a PHP script from a MySQL trigger