Linkin Park Posted September 12, 2012 Posted September 12, 2012 Hi, I need to remove all members of all the guilds except the guild master of the guilds in my database, how to do it? It's like wiping all members of the guilds except the guild master to still save the guilds. Quote
Emistry Posted September 12, 2012 Posted September 12, 2012 try run this in your SQL....make sure you do backup 1st just in case anything happen... DELETE FROM `guild` WHERE `name` <> `master` ; Quote
Linkin Park Posted September 12, 2012 Author Posted September 12, 2012 (edited) try run this in your SQL....make sure you do backup 1st just in case anything happen... DELETE FROM `guild` WHERE `name` <> `master` ; I don't think this is the right query as the guild members are located inside the guild_member table. Will this query work? DELETE FROM `guild_member` where position <> 0 Edited September 12, 2012 by RaGERO Quote
Brian Posted September 12, 2012 Posted September 12, 2012 stop the login, char, and map servers run this first SQL query:DELETE FROM `guild_member` WHERE `char_id` NOT IN (SELECT `char_id` FROM `guild`); run this second SQL query:UPDATE `char` SET `guild_id`=0 WHERE `char_id` NOT IN (SELECT `char_id` FROM `guild_member`); 1 Quote
Linkin Park Posted September 12, 2012 Author Posted September 12, 2012 stop the login, char, and map servers run this first SQL query:DELETE FROM `guild_member` WHERE `char_id` NOT IN (SELECT `char_id` FROM `guild`); run this second SQL query:UPDATE `char` SET `guild_id`=0 WHERE `char_id` NOT IN (SELECT `char_id` FROM `guild_member`); Thank you! Quote
Question
Linkin Park
Hi,
I need to remove all members of all the guilds except the guild master of the guilds in my database, how to do it?
It's like wiping all members of the guilds except the guild master to still save the guilds.
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.