PDA

View Full Version : SQL query type stuff


Trig
05-22-2002, 08:50 PM
Ok any of you clever guys and girls out there know what sql command would bring back the following with this scenario.

eq.npc_types (ID, name) [Where ID =eq.spawnentry(NPCID)
eq.spawnentry (spawngroupID, NPCID)
eq.spawn2 (spawngroupID, Zone)

now with that information in mind (yes i realise they have other fields as well but from what i can tell those are the pertinent ones) what would the SQL command be (if possible) to return:

eq.spawn2's zone=>spawngroupid associated and displayed directly alongside the appropriate information in eq.npc_types?

Any ideas?

Trig

strychn
05-23-2002, 12:50 AM
you mean like npc info per zone? i'm not sure what you are saying. if you can clarify a little, i can tell you what you want.

strychn
05-23-2002, 01:20 AM
do you mean something like....

select npc_types.name, npc_types.level, spawn2.spawngroupid, spawn2.zone, spawn2.x, spawn2.y, spawn2.z
from npc_types, spawn2, spawnentry where spawn2.spawngroupid=spawnentry.spawngroupid and npc_types.id=spawngroup.npcid and spawn2.zone='qeynos'

that would return all the spawn entries for all the spawns in qeynos. you can add/remove what fields from npc_types to display.
??

Trig
05-23-2002, 08:53 AM
Cheers Strychn that's pretty much what I was looking for.... I'll try it tonite when i get home from work and will let you know :)

strychn
05-23-2002, 11:57 AM
kewl. glad to be of help. need anything else let me know :)