Am using season 4 files can anyone give me some advice on how to do this?
Am using season 4 files can anyone give me some advice on how to do this?
Here is a simple php script...
PHP Code:mssql_connect("host","user","pass");
// if your account tables (MEMB_STAT, MEMB_INFO) is in muonline
mssql_select_db("muonline");
$q = mssql_query("select memb___id,DisConnectTM from MEMB_STAT where ConnecStat=0");
for($i=0; $i < mssql_num_rows($q); $i++)
{
$d = mssql_fetch_row($q);
// get total seconds of 30 days
$days30 = 60*60*24*30;
// get last disconnect time in seconds
$lastdc = strtotime($d[1]);
// check if current time is 30 days greater than last dc
if((time()-$lastdc) > $days30)
{
// delete account
mssql_query("delete from MEMB_INFO where memb___id='".$d[0]."'");
// delete characters
mssql_query("delete from characters where AccountId='".$d[0]."'");
// delete list in AccountCharacter table
mssql_query("delete from AccountCharacter where ID='".$d[0]."'");
// delete from MEMB_STAT
mssql_query("delete from MEMB_STAT where memb___id='".$d[0]."'");
}
}
echo "Done";
If you need SQL Script look here http://forum.ragezone.com/f196/guide...-admin-353278/
or use this
delete account with nomore connect from 2007-06-01
GLCode:delete from memb_info where memb___id in ( select memb___id from memb_stat where disconnecttm<'2007-06-01') delete from accountcharacter where id in ( select memb___id from memb_stat where disconnecttm<'2007-06-01') delete from character where accountid in ( select memb___id from memb_stat where disconnecttm<'2007-06-01') delete from warehouse where accountid in ( select memb___id from memb_stat where disconnecttm<'2007-06-01')![]()
Last edited by vailoelle; 02-01-10 at 12:56 PM.
Thank you very much ^^
ill test them ^^
i get SQL error msg
Code:Server: Msg 446, Level 16, State 9, Line 5 Cannot resolve collation conflict for equal to operation.