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

Database

Natan Beckman

Well-Known Member
Joined
Aug 1, 2010
Messages
548
Reaction score
54
Location
Teresina-PI/Br
Help execute in database:

HTML:
DELETE FROM player_depotitems, player_items, tile_items WHERE itemtype = 11389

And last:

Error

HTML:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE itemtype = 11389' at line 1
 
try
SQL:
DELETE FROM player_depotitems, player_items, tile_items WHERE itemtype = "11389"
DELETE FROM player_depotitems, player_items, tile_items WHERE itemtype = '11389'
 
no =x

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE itemtype = '11389'' at line 1
DELETE FROM player_depotitems,
player_items,
tile_items WHERE itemtype = '11389'

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE itemtype = "11389"' at line 1
DELETE FROM player_depotitems,
player_items,
tile_items WHERE itemtype = "11389"
 
To delete rows from multiple tables, you have to type the tables twice (in the same order). Once between DELETE and FROM, and once after FROM. You might also have to join the tables together.
 
Last edited:
To delete items from multiple tables at once you have to repeat the tables.
SQL:
DELETE `player_depotitems`, `player_items`, `tile_items` FROM `player_depotitems`, `player_items`, `tile_items` WHERE `itemtype` = 11389;
Also make sure the "itemtype" field exists in all three of the tables.

huh?
SQL:
DELETE FROM `player_depotitems`, `player_items`, `tile_items` WHERE `itemtype` = 11389;
schuld't it be like this?
 
Thank you, I like it as well! :)

Any way, here's a few quick pointers for you.
SQL:
DELETE FROM `player_depotitems`, `player_items` WHERE `itemtype` = 1234;
Gives you a regular SQL error.
SQL:
DELETE `player_depotitems`, `player_items` FROM  `player_depotitems`, `player_items` WHERE `itemtype` = 1234;
Gives you an error about `itemtype` being ambiguous.
SQL:
DELETE `player_depotitems`, `player_items` FROM  `player_depotitems`, `player_items` WHERE `player_items`.`itemtype` = 1234;
Works as expected.
 
Back
Top