Difference between revisions of "Template:Cards"

From Artifact: The Dota Card Game Wiki
Jump to: navigation, search
Line 4: Line 4:
 
|where=type LIKE "{{{type|%%}}}%" AND type NOT LIKE "%%Ability" <!--
 
|where=type LIKE "{{{type|%%}}}%" AND type NOT LIKE "%%Ability" <!--
 
-->{{#if: {{{keyword|}}} | AND UPPER(text) LIKE UPPER("%{{{keyword|}}}%") }}<!--
 
-->{{#if: {{{keyword|}}} | AND UPPER(text) LIKE UPPER("%{{{keyword|}}}%") }}<!--
-->{{#if: {{{crosslane|}}} | true | AND is_crosslane LIKE "True" }}<!--
+
-->{{#ifeq: {{{crosslane|}}} | true | AND is_crosslane LIKE "True" }}<!--
 
-->{{#if: {{{subtype|}}} | AND UPPER(subtype) LIKE UPPER("{{{subtype}}}") }}
 
-->{{#if: {{{subtype|}}} | AND UPPER(subtype) LIKE UPPER("{{{subtype}}}") }}
 
|group by=_pageName
 
|group by=_pageName

Revision as of 23:51, 13 December 2018

Template-info.png Documentation

This is a fairly simple query template that returns a alphabetically sorted table of card images.

Usage

{{Cards
| keyword    = 
}}

Example

With the keyword "Swap" specified,

A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?

Query: SELECT CONCAT(name) AS `name`,CONCAT(image) AS `image` FROM `cargo__card_data` WHERE type LIKE "%%%" AND type NOT LIKE "%%Ability" AND UPPER(text) LIKE UPPER("%Swap%") GROUP BY `_pageName` ORDER BY `color desc`,`type="Hero" desc`,`manacost`,`goldcost`,`name` LIMIT 500 Function: CargoSQLQuery::run Error: 1054 Unknown column 'color desc' in 'order clause' (geo-db-i-master.query.consul.)

{{Cards
| keyword     = Swap
}}