比如
where pref_id='40' and city_id='133' and
like name like '%啊啊%'
时
用$this->db->where和$this->db->like如何写。
我就是按照$this->db->where和$this->db->like顺序写的,检索的结果比只使用$this->db->where的结果多很多
试过了,果然 $this->db->where后面加上$this->db->like和$this->db->or_like
会变成
where pref_id='40' and city_id='133' and
like name like '%啊啊%' or like name_k like '%啊啊%'
但是想要的结果是
where pref_id='40' and city_id='133' and
( name like '%啊啊%' or like name_k like '%啊啊%')