View Single Post
  #2  
Old 12-20-2017, 02:08 PM
Dinocanid's Avatar
Dinocanid Dinocanid is offline
Member
 
Join Date: Aug 2016
Location: Maryland, USA
Posts: 516
Gender: Unknown/Other
Credits: 63,642
Dinocanid is on a distinguished road
Default

You could put this in class_template.php under "private function assignTemplateVars()":
PHP Code:
$itemTotal$mysidia->db->select("inventory", array("iid"), "owner = '{$mysidia->user->username}'")->rowCount();
$this->assign("itemTotal",$itemTotal); 
Now in your template.tpl you can display the user's total amount of items in the inventory with {$itemTotal}
__________________
Reply With Quote