NSW42 Posted October 9, 2007 Share Posted October 9, 2007 Heya, just wonder if there is a way to add something into mysql db that can delete any account that is not logged into after 30 days.. Many Thanks Quote Link to comment https://forums.phpfreaks.com/topic/72435-delete-account-after-30-days/ Share on other sites More sharing options...
fenway Posted October 9, 2007 Share Posted October 9, 2007 Depending on what you're actually trying to accomplish and don't want to use a maintenance script or the event scheduler in 5.1, why not just add a field called "valid_until", and set it to NOW() + INTERVAL 30 DAY every time they log in? Quote Link to comment https://forums.phpfreaks.com/topic/72435-delete-account-after-30-days/#findComment-365294 Share on other sites More sharing options...
NSW42 Posted October 11, 2007 Author Share Posted October 11, 2007 Depending on what you're actually trying to accomplish and don't want to use a maintenance script or the event scheduler in 5.1, why not just add a field called "valid_until", and set it to NOW() + INTERVAL 30 DAY every time they log in? can you enlighten me in exactly how the vaild is wrote and will it actually delete the unused account after the 30 day period many thanks Quote Link to comment https://forums.phpfreaks.com/topic/72435-delete-account-after-30-days/#findComment-366940 Share on other sites More sharing options...
fenway Posted October 11, 2007 Share Posted October 11, 2007 Nothing will actually delete the account for you... but you won't have to if you include a valid_until date field that you check in your select statement. Quote Link to comment https://forums.phpfreaks.com/topic/72435-delete-account-after-30-days/#findComment-367364 Share on other sites More sharing options...
NSW42 Posted October 12, 2007 Author Share Posted October 12, 2007 ok i kinda understand somewhat, but im still new on mysql, is there any chance of writing the actual vaild, i know its a big ask... Thanks again Quote Link to comment https://forums.phpfreaks.com/topic/72435-delete-account-after-30-days/#findComment-367612 Share on other sites More sharing options...
fenway Posted October 12, 2007 Share Posted October 12, 2007 I'm not sure I know what you mean... just add it to the where clause. Quote Link to comment https://forums.phpfreaks.com/topic/72435-delete-account-after-30-days/#findComment-367822 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.