group_concat和join codeigniter给出致命错误

时间:2017-09-20 09:17:16

标签: php mysql codeigniter

这是我在模型中的查询(在我的sql中,这个查询工作正常,但在代码中,它给了我致命的错误(在非对象上调用成员函数result())

   $this->db->select('j.*, c.name as Cname, d.name as Dname, e.name as 
    Ename,GROUP_CONCAT(s.qualification SEPARATOR ",")  as  
    Qualification,GROUP_CONCAT(s.year SEPARATOR ",") as 
    Year,GROUP_CONCAT(s.institute SEPARATOR ",") as Institute' ); 
    $this->db->from('jobseekers j');
    $this->db->join('city c','c.id = j.location','left'); 
    $this->db->join('vertical e','e.id = j.vertical','left');
    $this->db->join('designation d','d.id = j.designation','left');
    $this->db->join('jobseekers_qul s','s.jobseekers_id = j.id','left');
    $this->db->group_by('j.id');
    $query = $this->db->get();
    $row = $query->result();
    return $row;

0 个答案:

没有答案