Difference between revisions of "Template:StellarDataQuery"
Jump to navigation
Jump to search
| Line 1: | Line 1: | ||
{{#cargo_query: | {{#cargo_query: | ||
| − | tables=StellarData, TradeSummary | + | tables=StellarData, TradeSummary,BasesCode,AllegianceCode |
| − | |join on=StellarData.codes__full = TradeSummary.code__full | + | |join on=StellarData.codes__full = TradeSummary.code__full,StellarData.bases = BasesCode.code,StellarData.allegiance = AllegianceCode.code |
| − | |fields=name, sector, subsector, era, hex, world, uwp, pcode, TradeSummary.description, sophonts, details, ix, ex, cx, | + | |fields=StellarData.name, sector, subsector, era, hex, world, uwp, pcode, TradeSummary.description, sophonts, details, ix, ex, cx, |
nobility, bases, zone, popmul, belts, giants, worlds, allegiance, stars, wtn, ru, gwp, trade, passengers, starport_build, | nobility, bases, zone, popmul, belts, giants, worlds, allegiance, stars, wtn, ru, gwp, trade, passengers, starport_build, | ||
| − | army, port_size, SPA, CONCAT('{{#replace:{{{name|}}}|'|''}}')= worldName | + | army, port_size, SPA, CONCAT('{{#replace:{{{name|}}}|'|''}}')= worldName, |
| + | REPLACE(BasesCode.description,'%Allegiance%',AllegianceCode.short_name) = basesDescription | ||
|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 00:14, 23 September 2016
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.