CI COUNT

$dataTable = $this->db->get_where('table_name', ["table_id"=>$id]);
return $dataTable->num_rows() > 0 ? true : false;
fmhrs_fathoni