$sql="Select * from my_table where 1"; $query = $this->db->query($SQL); return $query->result_array();
$query = $db->query('YOUR QUERY HERE');