Question : MySQL + PHP trigger

Hi
i have MySQL table that maintain users registration info.
i want to add new field .. data+time field so after one Month .. just one month exactly i want this field to set to null so when the user tries to login again i will check if it is null or not ,, thus i will know if month passes or not....... so he will re-new his registeration....

any help plz ??
many thanks in advance

Answer : MySQL + PHP trigger

Add another column (say expired) of type date. When a user registers and you are doing your insert, this new column will be computed by setting it to one month after registration date. So at every login, check to see if expired <= curdate(). If NOT, renew registration else proceed with registration.

I think that's a simple way to do it.
Random Solutions  
 
programming4us programming4us