Difference between revisions of "Template:World summary sophont"

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
* {{#cargo_query: tables=Sophonts|fields=name|format=List|where code = {{#if: {{{1|}}}|{{#if: {{#pos:{{{1}}}|(|0}} | {{#sub:{{{1}}}|1|-1}} | {{#sub:{{{1}}}|0|-1}} }}|}}
+
{{#cargo_query:
   |limit=1
+
  tables=Sophonts
  |more results text=
+
  |fields=name, CONCAT('{{#if: {{#pos:{{{1}}}|(|0}} |Home|Present}}') = Home, CONCAT('{{#if: {{{1|}}}|{{#sub:{{{1|}}}|-1}}|0}}')= Percent, CONCAT(name) = text, existing, status
  |intro={{#if: {{#pos:{{{1}}}|(|0}} | is the homeworld to   | {{#sub:{{{1|}}}|-1}}0% of the worlds population is }}
+
   |where=code = "{{#if: {{{1|}}}|{{#if: {{#pos:{{{1}}}|(|0}} | {{#sub:{{{1}}}|1|4}} | {{#sub:{{{1}}}|0|-1}} }}|}}"
  |outro={{#if: {{#pos:{{{1}}}|(|0}} | , a sophont species. | .}}
+
  |format=template
 +
  |template=World summary sophont.layout
 
   |default=
 
   |default=
}}{{#if: {{#pos:{{{1}}}|(|0}}|[[Category: Homeworld]]|}}<noinclude>
+
}}<noinclude>
A template to expand the sophonts, one at a time. Used as part of the World Summary list at the start of a world article
+
A template to expand the sophonts, one at a time. Used as part of the World Summary list at the start of a world article. See also [[Template:World summary sophont.layout]]
 
[[Category:Text Expansion Templates|World]][[Category: Cargo Templates|World]]
 
[[Category:Text Expansion Templates|World]][[Category: Cargo Templates|World]]
 
</noinclude>
 
</noinclude>

Revision as of 21:46, 18 August 2019

Unknown column 'code' in 'where clause'

A template to expand the sophonts, one at a time. Used as part of the World Summary list at the start of a world article. See also Template:World summary sophont.layout