Quote:
	
	
		| 
					Originally Posted by Angelox
					
				 Trick is, how do you figure out what is the loot in use, and what is not, so it can be removed? | 
	
 This query will tell you all Loottables that are not assigned to a NPC.
	Code:
	SELECT
  npc_types.id,
  lootdrop.id
FROM
  npc_types
  RIGHT JOIN lootdrop
    ON lootdrop.id=npc_types.loottable_id
WHERE
  npc_types.id IS NULL
 Warning this query will take a little bit of time to run, for some reason MySql does not like right joins looking for nulls but it will work and will give you the desired information.