That's a great link Francois, thanks for the help.  I tried Ant's
solution before posting and it wasn't working.

Thanks again guys,

Brendan

On Sep 16, 3:46 am, "Francois Zaninotto" <[EMAIL PROTECTED]
project.com> wrote:
> addOr() only works for columns on which you already have a criteria
> condition... I think ant's solution may not work in all cases.
>
> To be sure, you should use a Criterion condition 
> (seehttp://propel.phpdb.org/docs/user_guide/chapters/FindingObjects.html).
>
> If you find this a bit too complicated, consider using DbFinderPlugin
> (http://www.symfony-project.org/plugins/DbFinderPlugin/0_9_0?tab=plugi...)
> for your Propel queries ;)
>
> François
>
> 2008/9/16 Ant Cunningham <[EMAIL PROTECTED]>:
>
>
>
> > $c = new Criteria();
> > $c->add(FriendPeer::SENDER_ID, $id);
> > $c->addOr(FriendPeer::TARGET_ID, $id);
>
> > [EMAIL PROTECTED] wrote:
> >> I feel like I'm missing something, but how do you execute OR
> >> conditions with criteria?
>
> >> I'm populating a friends list and I'm wondering how to write an SQL
> >> statement like:
>
> >> SELECT * FROM friend WHERE senderId = '$id' OR targetId = '$id'
>
> >> I feel like this is really simple and I should have figured it out,
> >> but so far I haven't been able to.  I'm using sfPropelPager, otherwise
> >> I would just use criteria.
>
> >> Thanks for the help,
>
> >> Brendan
>
> > --
> > Ant Cunningham
> > Graphic Designer | Web Developer
> > Vector Based Design

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to