Difference between revisions of "Template:MonsterListLinks"
(Created page with "<noinclude> One (and only one) of the following * type: type that should be included * where: a where statement <hr> <nowiki>{{</nowiki>MonsterListLinks|type=magical beast<n...") |
|||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
Either | |||
* type: type that should be included (optional) | |||
* subtype: type that should be included (optional) | |||
or | |||
* where: a where statement | * where: a where statement | ||
Line 9: | Line 12: | ||
{{MonsterListLinks|type=magical beast}} | {{MonsterListLinks|type=magical beast}} | ||
<nowiki>{{</nowiki>MonsterListLinks|subtype=undead<nowiki>}}</nowiki> | |||
{{MonsterListLinks|subtype=undead}} | |||
<nowiki>{{</nowiki>MonsterListLinks|where=Subtypes HOLDS "human"<nowiki>}}</nowiki> | <nowiki>{{</nowiki>MonsterListLinks|where=Subtypes HOLDS "human"<nowiki>}}</nowiki> | ||
Line 16: | Line 23: | ||
</noinclude><!-- | </noinclude><!-- | ||
--><includeonly>{{#vardefine:where|{{{where|Type = "{{{type}}}"}}}}}<!-- | --><includeonly>{{#vardefine:where|{{{where|<!-- | ||
-->{{#if: {{{type|}}}|Type = "{{{type}}}"|}}<!-- | |||
-->{{IfAnd|{{{type|}}}|{{{subtype|}}}| AND }}<!-- | |||
-->{{#if: {{{subtype|}}}|Subtypes HOLDS "{{{subtype}}}"|}}<!-- | |||
-->}}}}}<!-- | |||
-->{{Grid|type=begin|border=true|cols=1}} | -->{{Grid|type=begin|border=true|cols=1}} | ||
{{#cargo_query:tables=Monsters | {{#cargo_query:tables=Monsters |
Revision as of 13:34, 20 November 2021
Either
- type: type that should be included (optional)
- subtype: type that should be included (optional)
or
- where: a where statement
{{MonsterListLinks|type=magical beast}}
Function: CargoSQLQuery::run Query: SELECT CONCAT( '', Name, '' ) AS `LinkName`,`CR` AS `CR`,`XP` AS `XP` FROM `cargo__Monsters` WHERE Type = "magical beast" GROUP BY `Name` ORDER BY `XP`,`Name` LIMIT 100
{{MonsterListLinks|subtype=undead}}
Function: CargoSQLQuery::run Query: SELECT CONCAT( '', Name, '' ) AS `LinkName`,`CR` AS `CR`,`XP` AS `XP` FROM `cargo__Monsters` WHERE `cargo__Monsters`.`_ID` IN (SELECT `_rowID` FROM `cargo__Monsters__Subtypes` WHERE `_value`= "undead") GROUP BY `Name` ORDER BY `XP`,`Name` LIMIT 100
{{MonsterListLinks|where=Subtypes HOLDS "human"}}
Function: CargoSQLQuery::run Query: SELECT CONCAT( '', Name, '' ) AS `LinkName`,`CR` AS `CR`,`XP` AS `XP` FROM `cargo__Monsters` WHERE `cargo__Monsters`.`_ID` IN (SELECT `_rowID` FROM `cargo__Monsters__Subtypes` WHERE `_value`= "human") GROUP BY `Name` ORDER BY `XP`,`Name` LIMIT 100