xyn Posted August 8, 2006 Share Posted August 8, 2006 Hi.Would someone be able to give me some advice on the easiest andmost effective way of going about checking account activations.Basically when they register it will register the time and date, I wantedto check if the account has been activated with in 15 days,If it has obviosuly the time and date will become the "last login" otherwiseit would stay the registered date & time. Clearly this way would work usingMYSQL, but I have no idea how to go about it.If the acocunt has not been activated within 15 days I wanted it to bedeleted automatically. Link to comment https://forums.phpfreaks.com/topic/16895-short-advice/ Share on other sites More sharing options...
leeming Posted August 8, 2006 Share Posted August 8, 2006 [quote author=xyn link=topic=103417.msg411733#msg411733 date=1155045459]Hi.Would someone be able to give me some advice on the easiest andmost effective way of going about checking account activations.Basically when they register it will register the time and date, I wantedto check if the account has been activated with in 15 days,If it has obviosuly the time and date will become the "last login" otherwiseit would stay the registered date & time. Clearly this way would work usingMYSQL, but I have no idea how to go about it.If the acocunt has not been activated within 15 days I wanted it to bedeleted automatically.[/quote]how is the date recorded? is it a datetime field, or set by time() Link to comment https://forums.phpfreaks.com/topic/16895-short-advice/#findComment-71148 Share on other sites More sharing options...
xyn Posted August 8, 2006 Author Share Posted August 8, 2006 The date and time is set by:date("d-m-y"); [nn-nn-nnnn]date("g:ia"); [n:nam/pm] Link to comment https://forums.phpfreaks.com/topic/16895-short-advice/#findComment-71152 Share on other sites More sharing options...
leeming Posted August 8, 2006 Share Posted August 8, 2006 some thing like this...[code]$borderdate = mktime(0, 0, 0, date("m"), date("d")-15 , date("Y")); //15 days agomysql_query("DELETE FROM <table> WHERE `signup_date` =< '$borderdate');[/code]BUT... im only guessing, try running the same ish query but as a select, so see if it picks up the right members Link to comment https://forums.phpfreaks.com/topic/16895-short-advice/#findComment-71154 Share on other sites More sharing options...
xyn Posted August 8, 2006 Author Share Posted August 8, 2006 I'll have a go. Link to comment https://forums.phpfreaks.com/topic/16895-short-advice/#findComment-71160 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.