• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

sql queries

Indenpedens

Banned User
Joined
Nov 6, 2010
Messages
584
Reaction score
39
Location
Poland
witam
potrzebuje takich 3 zapytan do bazy danych
- usuwa wszystkie accounty i playersy z bazy to osobno chyba
- i czysci wszystkie domki
:)
 
TRUNCATE TABLE `players`; TRUNCATE TABLE `accounts`;
UPDATE `houses` SET `owner` = 0, `paid` = 0, `warnings` = 0, `lastwarning` = 0; TRUNCATE TABLE `house_storage`; TRUNCATE TABLE `house_lists`; TRUNCATE TABLE `tiles`; TRUNCATE TABLE `tile_items`;
 
PHP:
DELETE `accounts` WHERE `accounts`.`id` != (SELECT `account_id` FROM `players` WHERE `players`.`name`='Account Manager' LIMIT 1);
DELETE `players` WHERE `players`.`name` != 'Account Manager'
 
PHP:
DELETE `accounts` WHERE `accounts`.`id` != (SELECT `account_id` FROM `players` WHERE `players`.`name`='Account Manager' LIMIT 1);

mistrzu,
dla 1000 kont w bazie Twoje zapytanie wykona 1000+1 zapytań.
 
np.
Code:
DELETE FROM `theforgottenserver`.`accounts` WHERE NOT `accounts`.`id` = 1
 
DELETE FROM `players` WHERE `id` NOT IN (x); - Gdzie x to id Account Managera
DELETE FROM `accounts` WHERE `id` NOT IN (x); - Gdzie x to id Account Managera
 
Back
Top