$sql = "SELECT * FROM apps as a";
$where = array();
if(isset($filter['app_name']) && $filter['app_name'] != '0') {
$app_name = addslashes($filter['app_name']);
$collate = get_collate($filter['app_name']);
$where[] = "LOWER(a.name) $collate LIKE LOWER('%" . mysql_real_escape_string($app_name). "%')"; }
if ($where){
$sql .= " WHERE " . implode(" AND ", $where);
}
$query = $this->db->query($sql);
return $query->result();
如果param $ filter ['app_name']包含字符“(”或“)”来自codeigniter的$ query-> result()返回null但是如果我在PhpMyAdmin中直接查询它返回结果。请帮我修复这个问题。 TKS。