Difference between revisions of "Template:StellarDataQuery"
Jump to navigation
Jump to search
(20 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
tables=StellarData, TradeSummary,BasesCode,AllegianceCode | tables=StellarData, TradeSummary,BasesCode,AllegianceCode | ||
|join on=StellarData.codes__full = TradeSummary.code__full,StellarData.bases = BasesCode.code,StellarData.allegiance = AllegianceCode.code | |join on=StellarData.codes__full = TradeSummary.code__full,StellarData.bases = BasesCode.code,StellarData.allegiance = AllegianceCode.code | ||
− | |fields=StellarData.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, StellarData.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%',COALESCE(AllegianceCode.short_name, '')) = basesDescription | + | REPLACE(REPLACE(BasesCode.description,'%Allegiance%',COALESCE(AllegianceCode.short_name, '')),'%article%',COALESCE(AllegianceCode.article,'a')) = basesDescription, |
− | |where=StellarData.world="{{#titleparts: {{PAGENAME}}}}" | + | BasesCode.category = basesCategory, |
− | |order by=FIELD(era, 'Milieu 1116', 'Milieu 0', 'Second Survey', 'New Era') | + | CONCAT('{{#replace:{{{Non-canon trade codes|}}}|'|''}}')=NCcodes, |
+ | CONCAT('{{#replace:{{{First Survey name|}}}|'|''}}')=FSName, | ||
+ | CONCAT('{{#replace:{{{Nahuatl name|}}}|'|''}}')=NSName, | ||
+ | IF(LENGTH(TradeSummary.category)>0, CONCAT('[[',TradeSummary.category,']]'),' ')=TSCategory | ||
+ | |where=StellarData.world="{{#titleparts: {{PAGENAME}}}}" {{#if:{{{era|}}}| AND era = CONCAT('{{#replace:{{{era}}}|'|''}}')}} | ||
+ | |order by=FIELD(era, 'Milieu 1116', 'Milieu 0', 'Second Survey', 'Milieu 1130', 'New Era') | ||
|format=template | |format=template | ||
|template=StellarData.layout | |template=StellarData.layout | ||
+ | |named args=yes | ||
}}<noinclude> | }}<noinclude> | ||
[[Category: Cargo Templates|StellarData]] | [[Category: Cargo Templates|StellarData]] | ||
Line 15: | Line 21: | ||
The query on this template uses [[Template: StellarData.layout]] to format the raw data into a page layout form. | The query on this template uses [[Template: StellarData.layout]] to format the raw data into a page layout form. | ||
+ | |||
+ | Parameters: | ||
+ | |||
+ | * Name: Full [[Template: World]] template for the name of the world | ||
+ | * Non-canon trade codes: Any trade codes that are not part of the canon T5SS codes | ||
+ | * First Survey name: Name of the world from the first survey. | ||
+ | * Nahuatl name : [[Nahuatl]] name of the world for the [[Amec Trade Protectorate]]. | ||
+ | * era : name of the era to be selected | ||
</noinclude> | </noinclude> |
Latest revision as of 16:25, 31 October 2021
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.
Parameters:
- Name: Full Template: World template for the name of the world
- Non-canon trade codes: Any trade codes that are not part of the canon T5SS codes
- First Survey name: Name of the world from the first survey.
- Nahuatl name : Nahuatl name of the world for the Amec Trade Protectorate.
- era : name of the era to be selected