如何获得这样的SQL:
select * from foo where LOWER(foo_name) like '%test%';
我知道我可以做到这一点:
select * from foo where LOWER(foo_name) = 'test';
经过:
$where->addPredicate(new Predicate\Expression('LOWER(foo_name) = ?', 'test' ));
还有这个:
select * from foo where foo_name like '%test%';
经过:
$where->addPredicate( new \Zend\Db\Sql\Predicate\Like('LOWER(foo_name)', '%test%'));
但是如何将两者结合起来呢?