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 07-16-2010, 09:22 PM
Irreverent
The Solo Server
 
Join Date: May 2007
Posts: 416
Default SQL Help: Linking NPC ID to zoneid

ok, trying to create a SQL statement that will link a NPC to their zone #(because i really want the expansion column in the zone table)

Maybe i'm too excel but tried

Select a.name, b.expansion from npc_types a, zone b where b.zoneidnumber = left(a.id,length(a.id) - 3)) and length(a.id) > 3
__________________
OP of Irreverent Server (The Solo Server)
Our Forums
Reply With Quote
  #2  
Old 10-20-2010, 01:14 AM
csb4623
Sarnak
 
Join Date: Oct 2009
Location: Louisiana
Posts: 62
Default

SELECT nt.name, s2.zone
FROM spawn2 s2
JOIN spawngroup sg
ON sg.id = s2.spawngroupid
JOIN spawnentry se
ON se.spawngroupid = sg.id
JOIN npc_types nt
ON nt.id = se.npcid
WHERE s2.zone = 'crushbone';
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 11:52 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