ZF2 How to orWhere()

前端 未结 2 1849
我在风中等你
我在风中等你 2020-12-15 08:37

I am trying to figure out how to make a Mysql Select with an OR in where Clause. By default all clauses in where statement are ANDed and after some hours of try and fail and

2条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-15 09:08

    or you cloud use:

    $select->where
        ->like('content','%'.$searchstring.'%')
        ->or
        ->like('title','%'.$searchstring.'%');
    

提交回复
热议问题