cakephp query with multiple ‘OR’ condition
Now a days Cakephp is a most common framework. It is simple and easy to use.if you want use multiple OR condition in a query then use below code :
$getData = $this->YOUR_MODEL->find('all')->where([ [ 'or' => [array('name.text LIKE' => '%11%'), array('email.text LIKE' => '%22%'), ] ], [ 'or' => [array('name.text LIKE' => '%11%'), array('email.text LIKE' => '%22%'), ] ] ])->toArray();
For more info click here
Share