Hi Martin, It works well, thanks
Best regards, Andre On Sep 30, 2:52 pm, Marin Pranjić <marin.pran...@gmail.com> wrote: > On Fri, Sep 30, 2011 at 9:10 AM, arutti <andre.ru...@gmail.com> wrote: > > Hello, > > > I'm trying to make this simple query > > > SELECT a.*, s.* FROM account a, statement s WHERE a.nb = '2110' AND > > (a.id = s.debit OR a.id = s.credit) > > Hi arutti, > this should work: > > rows = db((db.account.nb == 2110) & ((db.account.id == db.statement.debit) | > (db.account.id == db.statement.credit)) ).select(db.account.ALL, > db.statement.ALL) > > Regards, > > Marin