Browser issues

Fatal error: Call to a member function select () on a non-object

in the line $ query-> select

class ModServiceListHelper { public function __construct() { parent::__construct(); $this->load->database(); } public function getList($params) { $db = JFactory::getDbo(); $query = $db -> getQuery(TRUE); $guery->select($db->quoteName(array('id', 'price', 'service', 'section', 'state'))); $query->from($db->quoteName('#__servicelist_')); $query->where('state = 1'); $query->order('service ASC'); $query->setlimit($params->get('section')); $db->setQuery($query); $result = $db->loadObjectList(); return $result; } } 

Please help me find a bug. In the administrative part, the module works without any complaints ...

  • probably should be like this: $ query = $ db-> getQuery (TRUE); - noadev
  • It does not help ... The browser persistently reports an error in the $ guery-> select line ($ db-> quoteName (array ('id', 'price', 'service', 'section', 'state'))); - Anton
  • Found.... !!! Cheers - Anton
  • Indeed, an error on the line below, but I thought that $ obj -> method () would not work, but it works - noadev

0