[Adjusting Database]Step 1 : Removing empty accounts

02/22/2012 11:53 LastThief*#1
Hey guys how're you doing ?.I hope you're all fine.
Since I'm still developing the SQLDev (Yea I didn't post the progress yet) I'm programming database cleaner php based so here is the first function that I've coded
PHP Code:
<?php
function CleanDBACC()
{
$query $this->Query("DELETE FROM TB_User WHERE NOT EXISTS (SELECT * FROM  SR_ShardCharNames WHERE SR_ShardCharNames.UserJID=TB_User.JID)");
if(...
//
}
?>
Here we go that query

Quote:
DELETE FROM TB_User WHERE NOT EXISTS (SELECT * FROM SR_ShardCharNames WHERE SR_ShardCharNames.UserJID=TB_User.JID)
You can execute it to clean useless accounts from database and have clean database to prevent some lags ;p


If you copied don't forget to credit me :)

Ciao,
LastThief
02/22/2012 12:04 AceSpace#2
Quote:
Originally Posted by LastThief* View Post
Hey guys how're you doing ?.I hope you're all fine.
Since I'm still developing the SQLDev (Yea I didn't post the progress yet) I'm programming database cleaner php based so here is the first function that I've coded

Code:
<?php
function CleanDBACC()
{
$query = $this->Query("DELETE FROM TB_User WHERE NOT EXISTS (SELECT * FROM  SR_ShardCharNames WHERE SR_ShardCharNames.UserJID=TB_User.JID)");
if(...//
}
?>
Here we go that query



You can execute it to clean useless accounts from database and have clean database to prevent some lags ;p


If you copied don't forget to credit me :)

Ciao,
LastThief
Thanks, Could you edit the code like
02/22/2012 12:06 •ᵔBeGodOfWarᵔ•#3
Oh, thanks ! Very useful ..
02/22/2012 12:21 BestOnWorld#4
thanks
02/22/2012 15:28 FoxRayz#5
Thanks, You're delivering good stuff as always ;)