Мне нужно произвести
Код: Выделить всё
WHERE (u.location LIKE '%?%' OR (u.long BETWEEN ? AND ? AND u.lat BETWEEN ? AND ?)) AND u.active=1
Код: Выделить всё
$this->db->group_start()
->like('u.location',$selector['text']);
if(isset($geo)){
$this->db->group_start();
$this->db->where('u.long >',$geo->long)
->where('u.long ',$geo->lat)
->where('u.lat
Подробнее здесь: [url]https://stackoverflow.com/questions/36457270/using-group-start-with-codeigniter-need-or-instead-of-and[/url]
Мобильная версия