On Fri, Sep 30, 2011 at 9:10 AM, arutti <[email protected]> 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

