Hi All,
I am confused about 1 query in my symfony project.
I have 2 tables as shown below.
1. photo
-photoid
-photoname
-userid
-tripid (either 0 or related tripid if trip is
assigned)
2. Trip
-id
-tripname
-isactive
Here, for photo->tripid it can be 0 if no trip assigned. Else
corresponding tripid value.
Now, I dont want to display photos for inactive trips. (trip->isactive
= false)
If I write
$c = new Criteria();
$c->add(PhotoPeer::USERID, $u->getProfile()->getUserId());
$c->addJoin (PhotoPeer::TRIPID, TripPeer::ID);
$c->add(TripPeer::IS_ACTIVE,'1');
Then it displays only matching records which are active. It doesn't
display records from photo with tripid = 0.
How to write condition here?
Thanks in advance.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---