$c = new Criteria(); $criterion = $c->getNewCriterion(GamePeer::ID, 5)->addOr($c->getNewCriterion(GamePeer::ID, 3); $c->add($criterion)
In most inistance i think you can skip the criterion part as simply calling Critera::addOr() will work like so: $c = new Criteria(); $c->add(GamePeer::ID, 5); $c->addOr(GamePeer::ID, 7); Lawrence Krubner wrote: > > If I want SQL that has an OR in it, like this: > > select * from teams where game_id=5 OR game_id=7 > > How do I get that with Propel. This is not covered in Chapter 8 of the > Symfony book. > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
