Food: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
m (Fix database error caused by CONCAT on List of Page field [CookEffect])
m (Fix CookEffect formatting)
Line 3: Line 3:


{{  #cargo_query:
{{  #cargo_query:
     tables = Food, GeneralData
     tables = Food, Food__CookEffect, GeneralData
     |join on = Food._pageName = GeneralData._pageName
     |join on = Food._pageName = GeneralData._pageName, Food._ID = Food__CookEffect._rowID
     |fields = CONCAT('[[File:', Image, '|20px]] [[',Food._pageName,']]') = Food, Hunger, Thirst, Description, CookEffect = Cooking Effect
     |fields = CONCAT('[[File:', Image, '|20px]] [[',Food._pageName,']]') = Food, Hunger, Thirst, Description, CONCAT('[[', Food__CookEffect._value, ']]') = Cooking Effect
     |where = Food._pageNamespace='0'
     |where = Food._pageNamespace='0'
     |format = dynamic table
     |format = dynamic table
     |rows per page = 30
     |rows per page = 30
     |details fields = Description }}
     |details fields = Description }}
<!-- TODO: Fix CookEffect formatting. Not sure how page lists are formatted since SQL functions do not work. -->

Revision as of 13:57, 22 February 2020

This article is a stub. You can help Caves of Qud Wiki by expanding it.
This article is a stub. You can help Caves of Qud Wiki by expanding it.

Food is a type of item that can be consumed or cooked with to satiate hunger or thirst.

Error 1052: Column 'Description' in field list is ambiguous (localhost)

Function: CargoSQLQuery::run Query: SELECT CONCAT('File:', Image, ' ',`Food`.`_pageName`,'') AS `Food`,`Hunger` AS `Hunger`,`Thirst` AS `Thirst`,`Description` AS `Description`,CONCAT('', `Food__CookEffect`.`_value`, '') AS `Cooking Effect` FROM `Food` LEFT OUTER JOIN `Food__CookEffect` ON ((`Food`.`_ID`=`Food__CookEffect`.`_rowID`)) LEFT OUTER JOIN `GeneralData` ON ((`Food`.`_pageName`=`GeneralData`.`_pageName`)) WHERE `Food`.`_pageNamespace`='0' ORDER BY CONCAT('File:', Image, ' ',`Food`.`_pageName`,''),`Hunger`,`Thirst`,`Description`,CONCAT('', `Food__CookEffect`.`_value`, '') LIMIT 100