View Single Post
  #2  
Old 10-24-2014, 11:07 PM
Figback65
Discordant
 
Join Date: Aug 2009
Location: 2131231231
Posts: 255
Default

Oh and I tried to build off this Faction query i found somewhere on these forums, but hell it just confused the shit outta me, Looks like it makes a temp table or something then merges the info with INNER JOIN but that is still beyond me.

Code:
SELECT
   npc_faction.id AS FactionTableID,
   npc_faction.name AS FactionTableName,
   primaryfaction AS PrimaryFactionID,
   factionA.name AS PrimaryFactionName,
   npc_faction_entries.faction_id AS FactionEntryID,
   factionB.name AS FactionEntryName,
   npc_faction_entries.value AS FactionEntryValue,
   npc_faction_entries.npc_value AS FactionEntryNpcValue
FROM
   npc_faction
   INNER JOIN faction_list factionA
     ON factionA.id=primaryfaction
   INNER JOIN npc_faction_entries
     ON npc_faction_entries.npc_faction_id=npc_faction.id
   INNER JOIN faction_list factionB
     ON factionB.id=npc_faction_entries.faction_id
WHERE
   npc_faction.id=112
__________________
Reply With Quote