Editing Template:StandardSort

From LOTR-TCG Wiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
<noinclude>This is used in various cargo queries to ensure a sensible, generalized ordering of cards.
<noinclude>This is used in various cargo queries to ensure a sensible, generalized ordering of cards.


</noinclude>CASE WHEN C.SetNum = '0' THEN 20 ELSE CASE WHEN C.SetNum RLIKE '^-?[0-9]+$' THEN CAST(C.SetNum AS UNSIGNED INTEGER) ELSE 100 END END, CASE WHEN C.SetNum = '0' THEN CASE WHEN C.Subset IN ('S', 'F') THEN 1 WHEN C.Subset IN ('D', 'L') THEN 2 WHEN C.Subset = 'M' THEN 3 WHEN C.Subset = 'J' THEN 4 ELSE 20 END ELSE CASE WHEN C.Subset = 'S' THEN 0 WHEN C.Subset = 'F' THEN 1 WHEN C.Subset = 'M' THEN 2 WHEN C.Subset = 'A' THEN 3 WHEN C.Subset = 'O' THEN 4 WHEN C.Subset = 'T' THEN 5 END END, C.CardNum, CR.Revision ASC
</noinclude>CASE WHEN C.SetNum = '0' THEN 20 ELSE CASE WHEN C.SetNum RLIKE '^-?[0-9]+$' THEN CAST(C.SetNum AS UNSIGNED INTEGER) ELSE 100 END END, CASE WHEN C.SetNum = '0' THEN CASE WHEN C.Subset IN ('S', 'F') THEN 1 WHEN C.Subset IN ('D', 'L') THEN 2 WHEN C.Subset = 'M' THEN 3 WHEN C.Subset = 'J' THEN 4 ELSE 20 END ELSE CASE WHEN C.Subset = 'S' THEN 0 WHEN C.Subset = 'F' THEN 1 WHEN C.Subset = 'M' THEN 2 WHEN C.Subset = 'A' THEN 3 WHEN C.Subset = 'O' THEN 4 WHEN C.Subset = 'T' THEN 5 END END, C.CardNum, CR.Revision DESC
Please note that all contributions to the LOTR-TCG Wiki may be edited, altered, or removed by other contributors. Your writing is liable to be edited mercilessly, so be sure to back up any major claims with links if possible.

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)