Perhaps you should add an alias in the subquery for the table ? Regards,
Before Printing, Think about Your Environmental Responsibility! Avant d'Imprimer, Pensez à Votre Responsabilitée Environnementale! On Sun, Oct 24, 2010 at 4:33 PM, axel at <[email protected]> wrote: > hello, > > I need the follwing query: > > -> select * from person p where > ... > and (p.personid not in (select personid form person2building...) > > where person2building is an m:n relation connecting person and > building table via primary keys > > the following doctrine query > $q = Doctrine_Query::create() > ->from('Person p') > ... > ->andWhere('p.personid not in (select personid from > person2building where buildingid = ' . $buildingid . ') '); > > generates the following sql statement, that doesn't work because of > the (select p.pesonid ... ) in the subselect section > > -> select * from person p ... and (p.personid not in (select > p.personid form person2building...) > > any ideas how to solve this? > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > 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 > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com 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
