I added a character to the upload rules that is not in my guild, this is my personal bank char. I then decided I didnt want the char's information on there, so I removed the permission for it to upload. Character profile stayed and a dropdown for "Guildless-H" and "My Guild Name" still present.
To reproduce:
* RosterCP->Upload Rules->Character->Allow - Fill in my bank char's information.
* Upload data thru UniUploader.
* Dropdown appears for Guildless-H and My Guild.
* RosterCP->Upload Rules->Character->Allow - Delete my bank char.
* Upload data thru UniUploader.
**Character is still present on Guildless-H page.
**Guildless-H page still exists even though there are no members with upload permissions.
**Guildless-H still exists and shows after manually deleting character from _members
Manual solution:
*Delete Guildless-H out of _guild
**Reset auto_increment to 2 (or whatever appropriate)
*Delete "Bank Char" out of _members
***Not sure of possible side effects.
Possible solution:
*For each guild in _guild verify there is at least one member in that guild by searching _members
**Downside - An extra query for each guild.
*On deletion of permission in Upload Rules, search _members and delete said member, as well as any other references that may be in other places in the db that I am unaware of.
*Have not tested, but am assuming that on deletion of a guilds permissions, the same thing may happen.
Thanks for the great product, and hard work.
Sql when adding.
- Code: Select all
SQL Queries
Line Time Query
lib/roster.php
125 0.0004 SELECT `config_name`, `config_value` FROM `roster20_config` ORDER BY `id` ASC;
387 0.0002 SELECT * FROM `roster20_addon`;
lib/login.php
70 0.0002 SELECT * FROM `roster20_account` ORDER BY `account_id` DESC;
admin/upload_rules.php
53 0.0005 INSERT INTO `roster20_upload`
(`name`,`server`,`region`,`type`,`default`) VALUES
('Wolfminer','Blackwater Raiders','US','2','0');
105 0.0003 SELECT * FROM `roster20_upload` WHERE `type` = '2' OR `type` = '3';
lib/functions.lib.php
1043 0.0002 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '1' ORDER BY `id` ASC;
1043 0.0003 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '2' ORDER BY `id` ASC;
1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '3' ORDER BY `id` ASC;
1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '4' ORDER BY `id` ASC;
1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '5' ORDER BY `id` ASC;
1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '6' ORDER BY `id` ASC;
lib/menu.php
374 0.0002 SELECT count(`member_id`) AS `amount`, IF(`officer_note` LIKE '%ALT-%',1,0) AS 'isalt', FLOOR(`level`/10) AS label FROM `roster20_members` WHERE `level` >= 10 GROUP BY isalt, label;
567 0.0002 SELECT `mb`.*, `a`.`basename` FROM `roster20_menu_button` AS mb LEFT JOIN `roster20_addon` AS a ON `mb`.`addon_id` = `a`.`addon_id` WHERE `a`.`addon_id` IS NULL OR `a`.`active` = 1;
584 0.0001 SELECT * FROM `roster20_menu` WHERE `section` IN ('util','realm','guild') ORDER BY `config_id`;
addons/memberslist/inc/search.inc.php
36 0.0002 SELECT `member_id`, `name` FROM `roster20_members` ORDER BY `name`;
Sql when deleting.
- Code: Select all
SQL Queries
Line Time Query
lib/roster.php
125 0.0004 SELECT `config_name`, `config_value` FROM `roster20_config` ORDER BY `id` ASC;
387 0.0002 SELECT * FROM `roster20_addon`;
lib/login.php
70 0.0002 SELECT * FROM `roster20_account` ORDER BY `account_id` DESC;
admin/upload_rules.php
69 0.0006 DELETE FROM `roster20_upload` WHERE `rule_id` = '4' LIMIT 1;
105 0.0003 SELECT * FROM `roster20_upload` WHERE `type` = '2' OR `type` = '3';
lib/functions.lib.php
1043 0.0002 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '1' ORDER BY `id` ASC;
1043 0.0002 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '2' ORDER BY `id` ASC;
1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '3' ORDER BY `id` ASC;
1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '4' ORDER BY `id` ASC;
1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '5' ORDER BY `id` ASC;
1043 0.0001 SELECT `config_name`, `config_value` FROM `roster20_addon_config` WHERE `addon_id` = '6' ORDER BY `id` ASC;
lib/menu.php
374 0.0002 SELECT count(`member_id`) AS `amount`, IF(`officer_note` LIKE '%ALT-%',1,0) AS 'isalt', FLOOR(`level`/10) AS label FROM `roster20_members` WHERE `level` >= 10 GROUP BY isalt, label;
567 0.0002 SELECT `mb`.*, `a`.`basename` FROM `roster20_menu_button` AS mb LEFT JOIN `roster20_addon` AS a ON `mb`.`addon_id` = `a`.`addon_id` WHERE `a`.`addon_id` IS NULL OR `a`.`active` = 1;
584 0.0001 SELECT * FROM `roster20_menu` WHERE `section` IN ('util','realm','guild') ORDER BY `config_id`;
addons/memberslist/inc/search.inc.php
36 0.0002 SELECT `member_id`, `name` FROM `roster20_members` ORDER BY `name`;
Edit: Added sql queries.