Hi all,
I have a system with training records of our staff. In the table called idr exist a field named due_date of type DATE.
I want to create a notification system where every morning I will automatically run a php script that will check for all records that are expiring a month from now.
So for example if today is 2011-11-16 I want to pick up all records with due_date between today and 2011-12-16 and do something with them (email or show on page, etc).
However I's stuck on the query. I keep playing around with date functions, like date_add, date_sub, etc. but I never can get the right records.
Can someone point me into right direction or provide me the WHERE attributes for te below statement.
SELECT FROM idr WHERE due_date ( help in here *).
I hope it doesn't sound to confusing.
Thanks for any help