Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-21-2013, 06:01 PM
Hateborne
Hill Giant
 
Join Date: May 2010
Posts: 125
Question More Efficient Method?

I am trying to find items that drop based on zone. Is there a more efficient method or way to write this? I'm tired and likely overlooking the most obvious way, but could some one point it out? :-\


Code:
SELECT DISTINCT i.id, i.name FROM items i 
	INNER JOIN lootdrop_entries lde ON i.id = lde.item_id
	INNER JOIN loottable_entries lte ON lde.lootdrop_id = lte.lootdrop_id
	INNER JOIN loottable lt ON lte.loottable_id = lt.id
	INNER JOIN npc_types nt ON lt.id = nt.loottable_id
	INNER JOIN spawnentry se ON nt.id = se.npcid
	INNER JOIN spawngroup sg ON se.spawngroupid = sg.id
	INNER JOIN spawn2 s2 ON sg.id = s2.spawngroupID
WHERE s2.zone = "frozenshadow";


-- spawn2 -> spawngroup -> spawnentry -> npc_type -> loottable -> loottable_entries -> lootdrop_entries -> items

-Hate
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:02 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3