|
- foreach($Tag as $key=>$val){
- //$sql .= "NewsTitle LIKE %{$val}% OR";
- $this->db->like('NewsTitle',$val,'both');
-
- if($key == count($Tag)-1){
- $this->db->or_like('NewsTitle',$val,'both');
- }
-
- }
- $this->db->where(['NewsState'=>0]);
- $this->db->where(['NewsWaste'=>0]);
- $this->db->where('NewsId !=',$data['NewsId']);
复制代码
这样的写法, $this->db->where(['NewsState'=>0]);
$this->db->where(['NewsWaste'=>0]); 不执行了,有人遇到过此问题嘛。 |
|