db->select('*'); $this->db->from('faq'); if($id!=0){ $this->db->where('id',$id); } $query = $this->db->get(); //echo $this->db->last_query();exit; return $query; } }