m |
m |
||
Line 6: | Line 6: | ||
|tables = items |
|tables = items |
||
|fields = items._pageName |
|fields = items._pageName |
||
− | |where = items.class LIKE "%" AND items.mods HOLDS {{{2}}} |
+ | |where = items.class LIKE "%" AND items.mods HOLDS "{{{2}}}" |
|group by = items._pageName |
|group by = items._pageName |
||
|order by = items.release_date |
|order by = items.release_date |
Revision as of 23:39, 19 January 2018
This template is intended to help finding mods that unique items uses and then add it to the {{Item}}
template. Items that uses the same mod are sorted by the items release version(!), the mods are often numbered so try to assign the highest numbered mod to the newest item.
Examples
{{#cargo_query: |tables=mods, mod_stats, spawn_weights, _pageData |join on=mods._pageName=mod_stats._pageName, mods._pageName=spawn_weights._pageName, mods._pageName=_pageData._pageName |fields=mods._pageName, mods.id, mods.stat_text, _pageData._creationDate, _pageData._modificationDate |where= mods.stat_text LIKE "%Physical Damage%" AND mods.generation_type=3 AND mod_stats.min=50 AND mod_stats.max=75 |limit=5000 |order by=mods.stat_text |group by=mods._pageName, mod_stats._pageName, spawn_weights._pageName |format=template |template=Mod table with items |intro={{Mod table with items/intro}} |outro={{Mod table with items/outro}} }}
yields:
Page | Mod id | Stat text | Is used in item | Created | Modified |
---|---|---|---|---|---|
Modifier:LocalIncreasedPhysicalDamagePercentUniqueOneHandMace1 | LocalIncreasedPhysicalDamagePercentUniqueOneHandMace1 | (50-75)% increased Physical Damage | A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: SELECT `cargo__items`.`_pageName` AS `_pageName` FROM `cargo__items` WHERE `cargo__items`.`class` LIKE "%" AND `cargo__items`.`mods` HOLDS "LocalIncreasedPhysicalDamagePercentUniqueOneHandMace1" GROUP BY `cargo__items`.`_pageName` ORDER BY `cargo__items`.`release_date` LIMIT 100 Function: CargoSQLQuery::run Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'HOLDS "LocalIncreasedPhysicalDamagePercentUniqueOneHandMace1" GROUP BY `cargo__' at line 1 (geo-db-i-master.query.consul.) |
||
Modifier:LocalIncreasedPhysicalDamagePercentUnique~~15 | LocalIncreasedPhysicalDamagePercentUnique__15 | (50-75)% increased Physical Damage | A database query error has occurred. Did you forget to run your application's database schema updater after upgrading?
Query: SELECT `cargo__items`.`_pageName` AS `_pageName` FROM `cargo__items` WHERE `cargo__items`.`class` LIKE "%" AND `cargo__items`.`mods` HOLDS "LocalIncreasedPhysicalDamagePercentUnique__15" GROUP BY `cargo__items`.`_pageName` ORDER BY `cargo__items`.`release_date` LIMIT 100 Function: CargoSQLQuery::run Error: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'HOLDS "LocalIncreasedPhysicalDamagePercentUnique__15" GROUP BY `cargo__items`.`' at line 1 (geo-db-i-master.query.consul.) |
Editors can experiment in this template's sandbox and testcases pages.
Please add categories to the /doc subpage. Subpages of this template.