Difference between revisions of "Template:StellarDataQuery"

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search
Line 7: Line 7:
 
REPLACE(REPLACE(BasesCode.description,'%Allegiance%',COALESCE(AllegianceCode.short_name, '')),'%article%',COALESCE(AllegianceCode.article,'a')) = basesDescription,
 
REPLACE(REPLACE(BasesCode.description,'%Allegiance%',COALESCE(AllegianceCode.short_name, '')),'%article%',COALESCE(AllegianceCode.article,'a')) = basesDescription,
 
   BasesCode.category = basesCategory,
 
   BasesCode.category = basesCategory,
   '{{{Non-canon trade codes}}}'=NCcodes,
+
   CONCAT('{{#replace:{{{Non-canon trade codes|}}}|'|''}}')=NCcodes,
   '{{{First Survey name}}}'=FSName
+
   CONCAT('{{#replace:{{{First Survey name|}}}|'|''}}')=FSName
 
  |where=StellarData.world="{{#titleparts: {{PAGENAME}}}}"
 
  |where=StellarData.world="{{#titleparts: {{PAGENAME}}}}"
 
  |order by=FIELD(era, 'Milieu 1116', 'Milieu 0', 'Second Survey', 'New Era')
 
  |order by=FIELD(era, 'Milieu 1116', 'Milieu 0', 'Second Survey', 'New Era')

Revision as of 02:08, 18 May 2017

No results This is a Cargo query template. This template queries data from the StellarData table. The data for this table is entered by using the Template:StellarData.

The query on this template uses Template: StellarData.layout to format the raw data into a page layout form.