我收到了带有 where 条件的 sql 问题:
$select->where('(users.user_fname LIKE (?) )','%'.$first.'%');
如何放入它 OR 条件,使其看起来像:
$select->where('(users.user_fname LIKE (?) )','%'.$first.'%');
OR
$select->where('(users.user_fname LIKE (?) )','%'.$last.'%');
我收到了带有 where 条件的 sql 问题:
$select->where('(users.user_fname LIKE (?) )','%'.$first.'%');
如何放入它 OR 条件,使其看起来像:
$select->where('(users.user_fname LIKE (?) )','%'.$first.'%');
OR
$select->where('(users.user_fname LIKE (?) )','%'.$last.'%');
http://framework.zend.com/manual/1.12/en/zend.db.select.html
$select
->where('(users.user_fname LIKE "%?%")', $first)
->orWhere('(users.user_fname LIKE "%?%")', $last)
;