View Single Post
  #8  
Old 10-05-2007, 02:37 PM
gernblan
Discordant
 
Join Date: Aug 2006
Posts: 394
Default

Since you were so kind to post that, I'll share this. This finds all loot drops by zone...

Code:
SELECT
  spawnentry.npcID,
  npc_types.loottable_id,
  loottable.name,
  loottable_entries.lootdrop_id,
  lootdrop.name,
  lootdrop_entries.item_id
FROM
  spawnentry
  INNER JOIN spawn2
    ON spawn2.spawngroupID = spawnentry.spawngroupID
  INNER JOIN npc_types
    ON npc_types.id = spawnentry.npcID
  INNER JOIN loottable
    ON loottable.id = npc_types.loottable_id
  INNER JOIN  loottable_entries
    ON loottable_entries.loottable_id = loottable.id
  INNER JOIN lootdrop
    ON lootdrop.id = loottable_entries.lootdrop_id
  INNER JOIN  lootdrop_entries
    ON lootdrop_entries.lootdrop_id = lootdrop.id
WHERE
  spawn2.zone='ZONESHORTNAMEGOESHERE'
ORDER BY
  lootdrop_entries.item_id,
  spawnentry.npcID,
  npc_types.loottable_id,
  loottable_entries.lootdrop_id;
__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
Reply With Quote