Page 1 of 1

delete account

Posted: Thu Nov 25, 2010 1:49 am
by n0name12
Hello,
How do i delete an account an all the data that the user might have or might be in.
I'm interested in the tables that a user stores data.
For example : characters table has multiple users from 1 acc (need to delete those)
accounts table has the acc info.
items table has items from char .. etc.
thanks in advance.

Re: delete account

Posted: Thu Nov 25, 2010 1:54 am
by denser
search and you find.
just delete sql entry of player and his account(i mean characters table)
other work made by idfactory.
or as i wrote in some thread...
change owned account of char to yours, set deletion time to 1 and save changes. then login and char or several(thousands?) will be properly deleted.
(key words to search: momo delete characters :lol: )

Re: delete account

Posted: Thu Nov 25, 2010 4:07 am
by netvirus
n0name12 wrote:Hello,
How do i delete an account an all the data that the user might have or might be in.
I'm interested in the tables that a user stores data.
For example : characters table has multiple users from 1 acc (need to delete those)
accounts table has the acc info.
items table has items from char .. etc.
thanks in advance.
select charId, char_name, account_name from characters where char_name LIKE '%nikname%';
delete from items where owner_id = 'write here charId';
delete from character_quests where charId = 'write here charId';
delete from characters where account_name = 'write here char login';
delete from accounts where login = 'write here char login';

Re: delete account

Posted: Thu Nov 25, 2010 4:25 am
by Pere
all this is done on each server startup.. just run

DELETE FROM characters WHERE account_name LIKE "put the sad account here";
DELETE FROM accounts WHERE login LIKE "put the sad account here";

Re: delete account

Posted: Thu Nov 25, 2010 5:06 am
by Szponiasty
netvirus wrote:
n0name12 wrote:Hello,
How do i delete an account an all the data that the user might have or might be in.
I'm interested in the tables that a user stores data.
For example : characters table has multiple users from 1 acc (need to delete those)
accounts table has the acc info.
items table has items from char .. etc.
thanks in advance.
select charId, char_name, account_name from characters where char_name LIKE '%nikname%';
Gz. You just removed all accounts and chars of players:
tommy
Ztommy
tommyPL
tommy666
...
xD

You just need to remove record from "accounts" table. Server will clean all the rest at next reboot.

Re: delete account

Posted: Thu Nov 25, 2010 9:10 am
by netvirus
Szponiasty wrote:
netvirus wrote:
n0name12 wrote:Hello,
How do i delete an account an all the data that the user might have or might be in.
I'm interested in the tables that a user stores data.
For example : characters table has multiple users from 1 acc (need to delete those)
accounts table has the acc info.
items table has items from char .. etc.
thanks in advance.
select charId, char_name, account_name from characters where char_name LIKE '%nikname%';
Gz. You just removed all accounts and chars of players:
tommy
Ztommy
tommyPL
tommy666
...
xD

You just need to remove record from "accounts" table. Server will clean all the rest at next reboot.
No. You choose a name which you interests :D

Re: delete account

Posted: Thu Nov 25, 2010 10:01 am
by n0name12
Affected rows : 0
for like %tommy% ><
should i be happy ?
ps: thanks for the answers.

Re: delete account

Posted: Thu Nov 25, 2010 10:21 am
by Szponiasty
netvirus wrote: You just need to remove record from "accounts" table. Server will clean all the rest at next reboot.
No. You choose a name which you interests :D[/quote]

Code: Select all

SELECT charId, char_name, account_name FROM characters WHERE char_name LIKE '%PL%'; -- try this ;)
Will select ALL chars that have anywhere in the name "PL" (case insensitive). You get my point now? If you want to delete char with nick "tommy", using LIKE "%tommy%" will delete all chars that have "tommy" anywhere in name. So if you have "tommy666", "tommyPL" - all those chars will be removed. If you do WHERE char_name LIKE '%a%' - now you're removing all chars that have letter 'a' in nickname... Better do WHERE char_name LIKE 'nickname' or just WHERE char_name='nickname'.

Re: delete account

Posted: Fri Nov 26, 2010 1:30 am
by netvirus
In that case if you know correctly a name writing which it is necessary to remove :)
We speak about same. I have given an example when some letters from a name are known.

Re: delete account

Posted: Fri Nov 26, 2010 10:44 am
by jurchiks
you don't want to delete characters of other players because you don't know the full nickname of the bad guy.

Re: delete account

Posted: Sun Nov 28, 2010 9:47 am
by wonderweiss

Code: Select all

DELETE FROM character_premium_items WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_friends WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_hennas WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_macroses WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_quests WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_quests_item WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_quests_global_data WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_recipebook WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_recipeshoplist WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_recommends WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_relations WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_shortcuts WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_skills WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_skills_save WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_subclasses WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM character_raid_points WHERE charId NOT IN (SELECT charId FROM characters); DELETE FROM clan_data WHERE leader_id NOT IN (SELECT charId FROM characters);DELETE FROM clan_privs WHERE clan_id NOT IN (SELECT clan_id FROM clan_data);DELETE FROM clan_skills WHERE clan_id NOT IN (SELECT clan_id FROM clan_data);DELETE FROM clan_introductions WHERE clan_id NOT IN (SELECT clan_id FROM clan_data);DELETE FROM clan_notices WHERE clan_id NOT IN (SELECT clan_id FROM clan_data);DELETE FROM clan_wars WHERE clan1 NOT IN (SELECT clan_id FROM clan_data) OR clan2 NOT IN (SELECT clan_id FROM clan_data);UPDATE clan_subpledges SET leader_id = 0 where leader_id NOT IN (SELECT charid from characters);DELETE FROM fortsiege_clans WHERE clan_id NOT IN (SELECT clan_id FROM clan_data); DELETE FROM pets WHERE item_obj_id NOT IN (SELECT object_id FROM items WHERE owner_id IN (SELECT charId FROM characters));DELETE FROM items WHERE owner_id NOT IN (SELECT charId FROM characters) AND owner_id NOT IN (SELECT clan_id FROM clan_data);DELETE FROM seven_signs WHERE charId NOT IN (SELECT charId FROM characters);UPDATE characters SET clanid = 0, title = "", clan_privs = 0 where clanid NOT IN (SELECT clan_id FROM clan_data);UPDATE clanhall SET ownerId = 0, paidUntil = 0 where ownerId NOT IN (SELECT clan_id FROM clan_data);DELETE FROM olympiad_nobles WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM olympiad_nobles_eom WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM heroes WHERE charId NOT IN (SELECT charId FROM characters);DELETE FROM item_attributes WHERE itemId NOT IN (SELECT object_id FROM items);DELETE FROM siege_clans WHERE clan_id NOT IN (SELECT clan_id FROM clan_data);DELETE FROM obj_restrictions WHERE obj_Id NOT IN (SELECT charId FROM characters); DELETE FROM accounts WHERE login NOT IN (SELECT account_name FROM characters);DELETE FROM accounts2 WHERE login NOT IN (SELECT account_name FROM characters);DELETE FROM account_data WHERE account_name NOT IN (SELECT login FROM accounts);

Re: delete account

Posted: Sun Nov 28, 2010 10:09 pm
by denser