嗨,我正在尝试这样的条件:
array("Curriculum.name LIKE" => $array,"Curriculum.surname LIKE" => $array,)
WHERE ((`Curriculum`.`name` LIKE IN ('%jon%','%x%')) OR (`Curriculum`.`surname` LIKE IN ('%jon%','%x%'))
如何实现这一点的任何想法?
foreach ($array as $name) { $conditions['or'][] = array('Curriculum.name LIKE' => "%$name%"); $conditions['or'][] = array('Curriculum.surname LIKE' => "%$name%"); }