请我对codeigniter有疑问。当我尝试在这里登录时结果
下面是我的代码:
$sub_and = '';
if($this->location_parent == 0){
$sub_and = "and g.idlocation_fk IN (".$locids.")";
}else{
$sub_and = "and g.idlocation_fk IN (".$locids.")";
}
if(($this->session->userdata("user_group_fk") == 1) || ($locids == '')){
$sub_and = '';
}
$sql = "select GROUP_CONCAT(DISTINCT(g.idgroup)) as group_id
FROM groups g
JOIN group_users gu ON gu.idgroup_fk = g.idgroup
WHERE gu.status = 0 and gu.iduser_fk = $iduser $sub_and";
$results = $this->db->query($sql);
$results = $results->row_array();
return $results;