Hello, You can't use the add() method as-is. You must write the sql statement yourself, using the Criteria::CUSTOM option:
> $c->add(Peer::A, Peer::A . Criteria::GREATER_THAN . Peer::B, Criteria::CUSTOM); On 10/19/07, Fabian Lange <[EMAIL PROTECTED]> wrote: > > > > Yes. > > why zero > > welcome! > > -----Ursprüngliche Nachricht----- > Von: symfony-users@googlegroups.com > Gesendet: 19.10.07 11:10:36 > An: symfony users <symfony-users@googlegroups.com> > Betreff: [symfony-users] How to compare with two column in Criteria > object? > > > > The SQL statement just like: > SELECT * FROM tab WHERE col1 > col2 > > I used like: > $c = new Criteria(); > $c->add(Peer::A, Peer::B, Criteria::GREATER_THAN); > but Peer::B always be zero! > > > thanks! > > > > > > > __________________________________________________________________________ > Erweitern Sie FreeMail zu einem noch leistungsstärkeren E-Mail-Postfach! > Mehr Infos unter http://produkte.web.de/club/?mc=021131 > > > > > -- Noël GUILBERT http://www.sensiolabs.com http://www.symfony-project.com Sensio Labs Tél: +33 1 40 99 80 80 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---