[Guide] Delete never used accounts

ReaL

New Member
Joined
Apr 13, 2008
Messages
1,244
Reaction score
654
This is a SQL Script (execute run in Query Analyzer), which will delete accounts, that have never logged in!

Code:
DECLARE @Acc varchar(10), @Chars varchar(10), @test int
select @test = 0
DECLARE LISTA CURSOR LOCAL FOR
SELECT memb___id FROM MEMB_INFO
OPEN LISTA
FETCH NEXT FROM LISTA INTO @Acc
WHILE @@FETCH_STATUS = 0
begin
if (SELECT COUNT(*) FROM Character where AccountID=@Acc) = 0
begin
DELETE from MEMB_INFO where memb___id=@Acc
DELETE from VI_CURR_INFO where memb___id=@Acc
select @test = @test + 1
end

FETCH NEXT FROM LISTA INTO @Acc
end
CLOSE LISTA
DEALLOCATE LISTA
print @test
Use at your own risk (cuz what if a player has just created his account and hasn't connected yet?!)
 
Last edited:

Mephisto

New Member
Joined
Apr 10, 2008
Messages
451
Reaction score
240
ReaL said:
Use at your own risk (cuz what if a player has just created his account and hasn't connected yet?!)
точно затова е хубаво при регистара един ред regtime=time() и ако regtime+864000 >time() трие акк....
 

EvoLuTioN

Active Member
Joined
May 3, 2008
Messages
815
Reaction score
164
Я може ли на бг да обесните какво тчно прави този скрипт :blink:
 

ReaL

New Member
Joined
Apr 13, 2008
Messages
1,244
Reaction score
654
Мерси, Mephisto ;)

БГ: Трие акаунти, които не са ползвани никога!
 

EvoLuTioN

Active Member
Joined
May 3, 2008
Messages
815
Reaction score
164
А мерси ше върши добра работа :cheezy:
 

ReaL

New Member
Joined
Apr 13, 2008
Messages
1,244
Reaction score
654
Имаше грешчица в query-то, вече оправена!
Вече бачка... :p
 

EvoLuTioN

Active Member
Joined
May 3, 2008
Messages
815
Reaction score
164
На теб с Total Accounts 26 надали ще ти трябва.Пак добре е сърварът беше рескан и сичко беше променено сърварът наново беше пуснат вчера така че 26 акаунта за 2 дена не е малко ;)
 
Thread starter Similar threads Forum Replies Date
ReaL [Guide] Delete Guilds With No Members Guides 3
P [Guide] SQL Query To Delete Empty Accounts Guides 6
ReaL [Guide] Delete / Truncate MuLog Guides 15

Similar threads