Difference between revisions of "Template:World name from Hex"

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{#cargo_query:
 
{{#cargo_query:
 
   tables=StellarData
 
   tables=StellarData
   |fields=CONCAT(name)=Name, CONCAT(sector)=Sector,hex
+
   |fields=SUBSTRING(world,1, LENGTH(world)-8)=Name, CONCAT(sector)=Sector,hex
 
   |where=hex='{{#sub:{{{1|}}}|-4}}' AND sectorCode='{{#sub: {{{1|}}}|0|4}}'
 
   |where=hex='{{#sub:{{{1|}}}|-4}}' AND sectorCode='{{#sub: {{{1|}}}|0|4}}'
   |format=tempalate
+
   |format=template
 
   |template=WorldS
 
   |template=WorldS
 +
  |limit=1
 
   |default=
 
   |default=
 +
  |more results text=
 
}}<noinclude>
 
}}<noinclude>
 
[[Category: Cargo Templates|World name]]
 
[[Category: Cargo Templates|World name]]

Latest revision as of 01:59, 7 May 2016

Query/format the world name from a hex/sector name using Template:WorldS

Single parameter is a sector code - hex. for example Dagu-0404