public function itemID($itemID){
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select( 'typeID','groupID','typeName','description','mass',
'volume','capacity','scapacity','portionSize','raceID',
'basePrice','published','marketGroupID','chanceOfDuplicating')
->from('#__eve_invTypes ')
->where('typeID = ' . "'". $itemID . "'" );
$db->setQuery($query);
$this->set( 'invTypes', $db->loadRow());
}
but my issue is that the only way i know how to call this function are to
$typeID = "12345";
$sql = $this->getModel( 'sql' );
$sql-> itemID($typeID);
and then
$this->set ('querr', $sql->invTypes);
but the way i currently want to do it, are.
- Iv created a Model, that creates an array. (one of the values is an typeID)
- then i print out this array as an form in an theme.
then i want to do $db->loadRow()); on some of the value in that table. (this i have to do everywhere in my application)
So I thought it would be smart to create an function for this. but the issue here is that the value $itemID has to be printed out before the Theme are printed out, but i don't know how.