-1

I got sql question with where condition:

$select->where('(users.user_fname LIKE (?) )','%'.$first.'%');

How to put in it OR condition so it would look like:

$select->where('(users.user_fname LIKE (?) )','%'.$first.'%');
OR
$select->where('(users.user_fname LIKE (?) )','%'.$last.'%');
ariel
  • 379
  • 4
  • 11

1 Answers1

1

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)
;
Sergey Eremin
  • 10,994
  • 2
  • 38
  • 44