In my controller : I have function like this :
$this->admindata->examview($a,3);
In model, I just have function like this :
function examview($examid, $examtipe){
$this->db->select("exam_id");
$this->db->from("mainexam");
$query = $this->db->get()
return $query->result();
}
And i got error :
Column 'id_group' in field list is ambiguous
SELECT `mu`.`obli`, `mu`.`id_exam_question`, `p`.`id_question`, `question`, `type_question`, `m`.`id_gabungan`, `p_parent`, `id_group` FROM (`exam`, `exam` mu) LEFT JOIN `randomexam` c ON `mu`.`id_group`= `c`.`id_question_order` LEFT JOIN `question` p ON `p`.`id_question` = `c`.`id_question` LEFT JOIN `main` m ON `m`.`id_question` = `p`.`id_question` WHERE `mu`.`id_exam` = '10' GROUP BY `mu`.`id_exam_question` ORDER BY `question_type` asc, LIMIT 0
I don't even have JOIN in my function. And If I delete $this->admindata->examview($a,3)
, My error has gone. Codeigniter try to call other function I think.