I'm trying to do a complex find in CakePHP that has multiple NOT LIKE variables pulled from a table.
Just as an example of trying to use an array, something like:
$blocked_words = array();
array_push($blocked_words,'%apple%','%orange%','%strawberry%','%grapes%');
'NOT' => array(
array('Api.reason LIKE' => $blocked_words)),
does not work, only:
'NOT' => array(
array('Api.reason LIKE' => '%apple%'),
array('Api.reason LIKE' => '%orange%'),
array('Api.reason LIKE' => '%grapes%')),
seems to work. While this is great, it doesn't solve my need when i'm pulling an unknown number of variables. Is there a way to have LIKE work with an array or a workaround?