Creative, Informative and Entertaining Stuff for everyone

Wednesday May 23rd 2012

Categories

Archives

Calender

April 2009
S M T W T F S
« Feb   May »
 1234
567891011
12131415161718
19202122232425
2627282930  

Archive for April 25th, 2009

How to add or condition in mysql query in symfony

$c->add(TblUsersPeer::USR_TYPE,array(2,3,6),Criteria::IN); $c1 = $c->getNewCriterion(TblUsersPeer::USR_PARENTID,$this->getUser()->getAttribute('userid'),Criteria::EQUAL); $c2 = $c->getNewCriterion(TblUsersPeer::USR_PARENTID,null, Criteria::ISNULL); $c1->addOr($c2); $c->add($c1);