|
$sql="select count(*) from table where a=a and b=d and(c like %a% and d like %a%)"; 这样的SQL语句用CI的Active Record 类 来写该怎么写 中间的 and(c like %a% and d like %a%)";
$this->db->where(array('a'=>a,'b'=>b));
$this->db->where($this->db->or_like('c'=>a,'d'=>d));
像这样子吗?
|
|