Linkin Park Posted September 12, 2012 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 227 Reputation: 11 Joined: 11/16/11 Last Seen: November 7, 2015 Share 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 Link to comment Share on other sites More sharing options...
Emistry Posted September 12, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share 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 Link to comment Share on other sites More sharing options...
Linkin Park Posted September 12, 2012 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 227 Reputation: 11 Joined: 11/16/11 Last Seen: November 7, 2015 Author Share 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 Link to comment Share on other sites More sharing options...
Brian Posted September 12, 2012 Group: Members Topic Count: 75 Topics Per Day: 0.02 Content Count: 2223 Reputation: 593 Joined: 10/26/11 Last Seen: June 2, 2018 Share 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 Link to comment Share on other sites More sharing options...
Linkin Park Posted September 12, 2012 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 227 Reputation: 11 Joined: 11/16/11 Last Seen: November 7, 2015 Author Share 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 Link to comment Share on other sites More sharing options...
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.
Link to comment
Share on other sites
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.