Advertisement
yamcsha

Zend Db - WHERE clauses with OR

Jul 19th, 2012
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. <?php
  2.  
  3.     $searchConditions      = array();
  4.    
  5.     $searchConditions[]    = $db->quoteInto ('a.field1 IN (?)', $array );
  6.     $searchConditions[]    = $db->quoteInto ("a.field2 LIKE '?%'", $input, 'INTEGER' );
  7.  
  8.     $select->where (new Zend_Db_Expr(implode(' OR ', $searchConditions)));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement