从消息继续:为 CodeIgniter 中的 foreach 提供的参数无效。
这是 $data 来自的函数..
function getSearchedUniversityTab($country, $state, $level, $degType) {
$query = $this->db->query("SELECT `university`.`uniId`, `university`.`name`
FROM (`university`)
inner JOIN (select degCollege, degType, count(*) as cnt from degree where `degType` = '$degType' group by degCollege) clg
ON clg.`degCollege` = `university`.`uniId`
WHERE `country` = '$country'
AND `state` = '$state'");
$result = $query->result_array();
foreach($result as $row)
{
$data[] = $row;
}
return $data;
$this->db->close();
}