Having Query\Builder and assigning dynamically parameters, I can't seem to figure out how to do LIKE selects.
// Loop params and assign them to query builder
$iteration = 0;
foreach($params as $param => $paramValue) {
if ($iteration == 0) {
$function = 'where';
} else {
$function = 'andWhere';
}
$equalitySign = ($equal == 'LIKE' ? '%' : '');
$resultSet->$function($param . ' ' . $equal . ' :' . $param . ':', array($param => ($equalitySign . $paramValue . $equalitySign)));
$iteration++;
}
This doesn't work.