public function getNameAttribut($attr_id) { $db = JFactory::getDBO(); $lang = JSFactory::getLang(); try { $query = $db->getQuery(true) ->select($db->qn($lang->get("name")) . 'AS" name'AS name") ->from($db->qn('#__jshopping_attr'"#__jshopping_attr")) ->where('attr_id"attr_id = '" . (int)$attr_id); // assuming attr_id is an integer echo $query->dump(); // never show query to the public $db->setQuery($query); if (($result = $db->loadResult()) === null) { echo "Null Resultset - Possible Query Logic Error @ getNameAttribut()"; } return $result; } catch (Exception $e) { echo "Syntax Error", $e->getMessage(); // never show error messages to the public return false; } } public function getAllAttributes($result = 0, $categorys = null, $order = null, $orderDir = null) { if (!$order) { $order = 'A'a.attr_ordering'; } if ($orderDir != 'DESC') { $orderDir = 'ASC'; } $lang = JSFactory::getLang(); $db = JFactory::getDBO(); try { $query = $db->getQuery(true) ->select( array( 'A"a.attr_id'attr_id", 'A"a.'" . $db->qn($lang->get("name")) . '" AS name'name", 'A"a.attr_type'attr_type", 'A"a.attr_ordering'attr_ordering", 'A"a.independent'independent", 'A"a.allcats'allcats", 'A"a.cats'cats", 'G"G.'" . $db->qn($lang->get("name")) . '" AS groupname'groupname" ) ) ->from($db->qn('#__jshopping_attr'"#__jshopping_attr", 'A'"a")) ->leftJoin($db->qn('#__jshopping_attr_groups'"#__jshopping_attr_groups") . '" G ON '" . $db->qn('A"a.group'group") . '" = G.id'id") ->order($db->qn($order) . " " . $orderDir); //extract(js_add_trigger(get_defined_vars(), "before")); echo $query->dump(); // never show query to the public $db->setQuery($query); if ((!$result = $db->loadObjectList()) === null) { echo "Null Resultset - Possible Query Logic Error @ getAllAttributes()"; } return $result; } catch (Exception $e) { echo "Syntax Error", $e->getMessage(); // never show error messages to the public return false; } } I have not tested the above code blocks, so if anyone discovers a typo let me know and I'll fix it up.
p.s. It appears that your $lang value is not being rendered, since the column that is not found is called name_en-GB. I think the first thing to investigate is the $lang value.