I've searched through the forums but haven't quite found what I need. I would like to do the following.
1)
I have a table that contains some information as well as 2 columns: date_registered and date_expires.
I would like to add the current date to date_registered everytime I add a new row. I would also like to put into date_expires the current date plus a certain amount of time.
Eg:
date_registered="2003-01-19";
date_expires="2003-01-19" + 6 months;
How do I do this with a MySQL query?
2)
I would like to write some sort of script that goes through this table everyday and sees if one of my entries is about to expire. It would then send off an e-mail telling me which entry is about to expire.
Any help would be appreciated.
D.