Hi There's a really really ugly hack for doing this
$c->addJoin(Table1Peer::ID, Table2Peer::TABLE1_ID . ' AND ' . Table1Peer::USER_ID . ' = 27', Criteria::LEFT_JOIN); Of course this is not guaranteed to work on all db engines and whatsoever, just a workaround if you really need it :). Zs. On 4/14/08, Jill Elaine <[EMAIL PROTECTED]> wrote: > > I am not sure, but perhaps this will work for you: > http://www.symfony-project.org/snippets/snippet/75 > > $c = new Criteria(); > $c->clearSelectColumns(); > > $c->addJoin(Table1Peer::ID, Table2Peer::TABLE1_ID, > Criteria::LEFT_JOIN); > > $subSelect = "table1.id IN ( SELECT id FROM table2 WHERE > table2.user_id='27')"; > $c->add(Table2Peer::USER_ID, $subSelect, Criteria::CUSTOM); > $results = Table1Peer::doSelect($c); > > Heh, I am not sure that is right, but I think something like that will > work?? > Good luck! > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---