I would like to have a select statement with more than two OR-statements.
My code looks like this:
$fl = TableRegistry::get(‘Ferns’);
$query = $fl->find();
$query = $query->where ([‘OR’ =>
[‘LOWER(familie_wissenschaftlich)’ => $eingabe],
[‘LOWER(familie_de)’ => $eingabe],
[‘LOWER(familie_fr)’ => $eingabe],
$result = $query
Unfortunately it does not work. When I click on the CakePHP-Debug-Kit-Button and look at the Sql-Log the WHERE-Statements looks like that:
LOWER(familie_wissenschaftlich) = ‘aspleniaceae’
AND LOWER(familie_de) = ‘aspleniaceae’
AND LOWER(familie_fr) = ‘aspleniaceae’
Could somebody please help me? Why is there and AND in the Where-clause and not a OR?
I am working with CakePHP 3.5.2.
Thank you for any helpfull advice.