• Страница 1 из 1
  • 1
[Trinity Core]SQL запросы Trinity Core
RangersDarknesДата: Воскресенье, 28.02.2010, 12:15 | Сообщение # 1
Чемпион
Группа: Пользователи
Сообщений: 185
Награды: 1
Репутация: 31
Статус:
Code
DELETE FROM `characters` where level<3;
DELETE FROM `character_action` where guid not in (select guid from `characters`);
DELETE FROM `character_aura` where guid not in (select guid from `characters`);
DELETE FROM `character_gifts` where guid not in (select guid from `characters`);
DELETE FROM `character_homebind` where guid not in (select guid from `characters`);
DELETE FROM `character_inventory` where guid not in (select guid from `characters`);
DELETE FROM `character_pet` where owner not in (select guid from `characters`);
DELETE FROM `character_queststatus` where guid not in (select guid from `characters`);
DELETE FROM `character_reputation` where guid not in (select guid from `characters`);
DELETE FROM `character_social` where guid not in (select guid from `characters`);
DELETE FROM `character_spell` where guid not in (select guid from `characters`);
DELETE FROM `character_spell_cooldown` where guid not in (select guid from `characters`);
DELETE FROM `character_ticket` where guid not in (select guid from `characters`);
DELETE FROM `character_tutorial` where account not in (select account from `characters`);
DELETE FROM `corpse` where `player` not in (select guid from `characters`);
DELETE FROM `character_inventory` where guid not in (SELECT guid FROM `characters`);
DELETE FROM `item_instance` where owner_guid not in (SELECT guid FROM `characters`);
DELETE FROM `account_data` where `account` not in (select account from `characters`);
DELETE FROM `character_account_data` where `guid` not in (select guid from `characters`);
DELETE FROM `character_achievement` where `guid` not in (select guid from `characters`);
DELETE FROM `character_achievement_progress` where `guid` not in (select guid from `characters`);
DELETE FROM `character_talent` where `guid` not in (select guid from `characters`);

База realmd.

Code
DELETE FROM `account` where `id` not in (select account from `characters`.`characters`);
DELETE FROM `account` WHERE `last_login`>90;

P.s. Для предварительной проверки меняем DELETE на SELECT *.

Вот интересует каким запросом можно удалить у игроков определенную вещь по айди, не имнно из инвенторя, а чтоб она удалилась если в банке гильд банке на нем и на почте?

Code
SELECT
guid,
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(data, ' ', 4), ' ', -1) AS UNSIGNED) item_id
FROM
item_instance
WHERE
CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(data, ' ', 4), ' ', -1) AS UNSIGNED)=номер_вещи
;
SELECT
*
FROM
character_inventory
WHERE
item_template=номер_вещи
;
в консоли навиката. после нахождения нужного делитим.
DELETE FROM item_instance WHERE CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(data, ' ', 4), ' ', -1) AS UNSIGNED)=номер_вещи;
DELETE FROM character_inventory WHERE item_template=номер_вещи;
 
DeimossooДата: Суббота, 22.06.2019, 14:10 | Сообщение # 2
Скаут
Группа: Пользователи
Сообщений: 4
Награды: 0
Репутация: 0
Статус:
Есть запрос на изменение спела бафа вендора? Если вендор бафает спелл из меню бафов, который выбрал игрок?
 
  • Страница 1 из 1
  • 1
Поиск: