Difference between revisions of "Template:QuadrantDataQuery"

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search
 
Line 12: Line 12:
 
{{#cargo_query: tables=SubsectorData
 
{{#cargo_query: tables=SubsectorData
 
  |fields=position,name
 
  |fields=position,name
  |where=sector=CONCAT('{{#replace:{{{sector|}}}|'|''}}')
+
  |where=sector=CONCAT('{{#replace:{{{sector|}}}|'|''}}') AND
 +
    CASE '{{{quadrant|}}}' WHEN 'Alpha' THEN SubsectorData.position in ('A', 'B', 'E', 'F')
 +
    WHEN 'Beta' THEN SubsectorData.position in ('C', 'D', 'G', 'H')
 +
    WHEN 'Gamma' THEN SubsectorData.position in ('I', 'J', 'M', 'N')
 +
    WHEN 'Delta' THEN SubsectorData.position in ('K', 'L', 'O', 'P')
 +
ELSE True END
 
  |order by=position
 
  |order by=position
 
  |format=template
 
  |format=template
Line 23: Line 28:
 
  |fields=code, description, detail, detail2
 
  |fields=code, description, detail, detail2
 
  |group by=code
 
  |group by=code
  |where=sector=CONCAT('{{#replace:{{{sector|}}}|'|''}}') and era=CONCAT('{{#replace:{{{era|}}}|'|''}}')
+
  |where=sector=CONCAT('{{#replace:{{{sector|}}}|'|''}}') and era=CONCAT('{{#replace:{{{era|}}}|'|''}}')  
 
  |order by=code
 
  |order by=code
 
  |named args=yes
 
  |named args=yes

Latest revision as of 17:38, 15 May 2016

# Generated by http://wiki.travellerrpg.com/
# 2026-01-01 12:02:56+00:00
No results
No results

No results

Hex  Name                 UWP       Remarks                                {Ix}   (Ex)    [Cx]   N    B   Z PBG W  A    Stellar        
---- -------------------- --------- -------------------------------------- ------ ------- ------ ---- --- - --- -- ---- ---------------
Column 'era' in WHERE is ambiguous

Used to generate a full listing of sector data in a given era into the T5 Second Survey data format.

parameters:

sector = sector name
era = era name

Uses the following templates for layout: