Template:CardSearch: Difference between revisions

From LOTR-TCG Wiki
No edit summary
No edit summary
Line 15: Line 15:
AND ("{{{rarityabbr|}}}" = "" OR "{{{rarityabbr|}}}" LIKE CONCAT('%(', C.Rarity, ')%'))
AND ("{{{rarityabbr|}}}" = "" OR "{{{rarityabbr|}}}" LIKE CONCAT('%(', C.Rarity, ')%'))


AND (CASE WHEN {{Boolean|{{{isFoil|no}}}}} = 0 THEN CR.Subset NOT IN ('F', 'A', 'O') ELSE CR.Subset IN ('F', 'A', 'O') END)
AND ("{{{textSearch|}}}" = "" OR CR.GameText LIKE "%{{{textSearch|}}}%")
AND ("{{{isPhysical|any}}}" = "any" OR IFNULL(CR.IsPhysical, C.IsPhysical) = {{Boolean|{{{isPhysical|any}}}}})
AND ("{{{textRegexSearch|}}}" = "" OR CR.GameText RLIKE "{{{textRegexSearch|}}}")
AND ("{{{isPlayable|any}}}" = "any" OR IFNULL(CR.isPlayable, C.isPlayable) = {{Boolean|{{{isPlayable|any}}}}})
AND ("{{{taggedTextRegexSearch|}}}" = "" OR CR.TaggedGameText RLIKE "{{{taggedTextRegexSearch|}}}")
AND ("{{{isErrata|any}}}" = "any" OR CASE WHEN {{Boolean|{{{isErrata|any}}}}} = 0 THEN CR.Revision = 0 WHEN {{Boolean|{{{isErrata|any}}}}} = 1 THEN CR.Revision > 0 END )
 
AND ("{{{languageName|}}}" = "" OR L.Name IN ("{{#replace:{{#replace:{{{languageName}}}|,|","}}||}}"))
AND ("{{{culture|}}}" = "" OR "{{{culture|}}}" LIKE CONCAT('%', C.Culture, '%'))
AND ("{{#replace:{{{loreSearch|}}}|"|}}" = "" OR CR.Lore RLIKE "{{#replace:{{{loreSearch|}}}|"|}}")
AND ("{{{usesCulture|}}}" = "" OR CR.GameText RLIKE "\[({{#replace:{{#replace:{{{usesCulture|}}}|,|{{!}}}}||}})]" )
 
 


AND ("{{{twilight|}}}" = "" OR CR.TwilightCost = "{{{twilight|}}}")
AND ("{{{twilight|}}}" = "" OR CR.TwilightCost = "{{{twilight|}}}")
Line 55: Line 57:
AND ("{{{arrowDir|Any}}}" = "Any" OR CR.ArrowDir = "{{{arrowDir|Any}}}")
AND ("{{{arrowDir|Any}}}" = "Any" OR CR.ArrowDir = "{{{arrowDir|Any}}}")


AND ("{{{textSearch|}}}" = "" OR CR.GameText LIKE "%{{{textSearch|}}}%")
AND (CASE WHEN {{Boolean|{{{isFoil|no}}}}} = 0 THEN CR.Subset NOT IN ('F', 'A', 'O') ELSE CR.Subset IN ('F', 'A', 'O') END)
AND ("{{{textRegexSearch|}}}" = "" OR CR.GameText RLIKE "{{{textRegexSearch|}}}")
AND ("{{{isPhysical|any}}}" = "any" OR IFNULL(CR.IsPhysical, C.IsPhysical) = {{Boolean|{{{isPhysical|any}}}}})
AND ("{{{taggedTextRegexSearch|}}}" = "" OR CR.TaggedGameText RLIKE "{{{taggedTextRegexSearch|}}}")
AND ("{{{isPlayable|any}}}" = "any" OR IFNULL(CR.isPlayable, C.isPlayable) = {{Boolean|{{{isPlayable|any}}}}})
AND ("{{{isErrata|any}}}" = "any" OR CASE WHEN {{Boolean|{{{isErrata|any}}}}} = 0 THEN CR.Revision = 0 WHEN {{Boolean|{{{isErrata|any}}}}} = 1 THEN CR.Revision > 0 END )
AND ("{{{languageName|}}}" = "" OR L.Name IN ("{{#replace:{{#replace:{{{languageName|}}}|,|","}}||}}"))
AND ("{{#replace:{{{loreSearch|}}}|"|}}" = "" OR CR.Lore RLIKE "{{#replace:{{{loreSearch|}}}|"|}}")
 





Revision as of 06:01, 26 September 2022

This is the "CardSearch" template.

It should be called in the following format:

{{CardSearch
|isUnique=
|sort=
}}

Edit the page to see the template text.