i am creating a script user registration method, register account automatically expire after X days. 1. I am using current_timestamp method (When user register Current date auto add in database, format look like this 2011-03-01 18:46:38) 2. i found lot of account expiry php tutorial but all use unix time (12545156454 etc) stamp but my website host on Windows IIS server using PHP/MYSQL. Eg. if i register at 2011-03-01 18:46:38 and after 30 days my account expired at 2011-04-01 18:46:38. bold area (time) not recommending to deffrence. Thanks,
I was looking at this for something else that expired after an hour.Try something like: UPDATE table SET fieldname = 'expired' WHERE registered-date < DATE_SUB(NOW(), INTERVAL 30 DAY) PHP: