Hi I'm trying to do a condition like this:
array("Curriculum.name LIKE" => $array,"Curriculum.surname LIKE" => $array,)
But cakephp output is the following:
WHERE ((`Curriculum`.`name` LIKE IN ('%jon%','%x%')) OR (`Curriculum`.`surname` LIKE IN ('%jon%','%x%'))
Any idea in how to achieve this?
foreach ($array as $name) {
$conditions['or'][] = array('Curriculum.name LIKE' => "%$name%");
$conditions['or'][] = array('Curriculum.surname LIKE' => "%$name%");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With