All pastes #42993 Raw Edit

Stuff

public text v1 · immutable
#42993 ·published 2006-02-24 09:59 UTC
rendered paste body
Ok  I have the following 3 mysql querys to run...

DELETE FROM items WHERE items.item_id NOT IN (SELECT item_id FROM etcitem);
     if you run this query it will delete all items that do not match item_id's found in ectitem table.
DELETE FROM items WHERE items.item_id NOT IN (SELECT item_id FROM armor);
     if you run this query it will delete all items that do not match item_id's found in armor table.
DELETE FROM items WHERE items.item_id NOT IN (SELECT item_id FROM weapon);
     if you run this query it will delete all items that do not match item_id's found in weapon table.

table items = all items / weapons / armor all players on the game hold currently.
table ectitem = all items the game reconizes.
table weapon = all weapons the game reconizes.
table armor = all armor the game reconizes.

I need a query that will do all 3 of those instructions, but all at once, so that it checks to see if an item_id found in items is not found in armor, weapon, or ectitem befor it deletes it.