• 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!

PHP [phpMyAdmin] Commands to edit database.

Very useful indeed, makes life easier for most of us.

Jester has made it again :)
 
How can i delete guilds that owner is not premium more??

ty
 
Last edited:
Is there any way to replace all crown backpacks (10522)from players/dps with normal backpacks (1988) ?
 
Is there any way to replace all crown backpacks (10522)from players/dps with normal backpacks (1988) ?

PHP:
UPDATE `player_items`, `player_depotitems`, `tile_items` SET `itemtype` = '1988' WHERE `itemtype` = '10522';
 
Thanks!

Edit:

I get this error when trying the command in the post above this:

#1052 - Column 'itemtype' in field list is ambiguous

What does this mean?
 
Last edited:
Thanks!

Edit:

I get this error when trying the command in the post above this:

#1052 - Column 'itemtype' in field list is ambiguous

What does this mean?

PHP:
UPDATE `player_items` SET `itemtype` = '1988' WHERE `itemtype` = '10522';
UPDATE `player_depotitems` SET `itemtype` = '1988' WHERE `itemtype` = '10522';
UPDATE `tile_items` SET `itemtype` = '1988' WHERE `itemtype` = '10522';
 
what if i only want to delete items that have 100x charges.
DELETE FROM player_depotitems WHERE itemtype = 2160,100;
DELETE FROM player_items WHERE itemtype = 2160,100;
DELETE FROM tile_items WHERE itemtype = 2160,100;

Is it like that?
 
I thought attributes (in this case charges) were stored in blob o_O
They are, but it seems like charges are count here.
Hmm yeah might be true, I have no idea actually since I have never really worked with the item tables.
 
What about this: remove house ownership if player is not on database.

:eek:
 
What about this: remove house ownership if player is not on database.

:eek:

PHP:
UPDATE `houses` SET `owner` = '0' WHERE `houses`.`owner` NOT IN ( SELECT `players`.`id` FROM `players` WHERE `players`.`id` = `houses`.`owner` );
 
UPDATE players SET posx = 932, posy = 932, posz = 7 WHERE account_id = 1;
It doesn't work. It changes position for all players, not only with acccount id 1
 
Help plz:
i am using this query:
DELETE FROM player_items WHERE player_id NOT IN (SELECT id FROM players)

But nothing is deletd:
0 row(s) deleted.

i had deleted a lot of players.
if this heapends because some trigger ploblem, is there some way to fix it ?
 
Back
Top