[web2py] Re: Help with a query

2010-03-30 Thread Jose
On 30 mar, 04:17, weheh wrote: > You need a left outer join. Here are a couple of examples that I think > should work (caveat: I didn't test them): ... > #way2 > qry1=(db.t1.f12==10) > leftjoin=db.t2.on(db.t2.f22==db.t1.id) > rows=db(qry1).select(db.t2.ALL,left=leftjoin) Yes, that's what I did,

[web2py] Re: Help with a query

2010-03-29 Thread weheh
You need a left outer join. Here are a couple of examples that I think should work (caveat: I didn't test them): #way1 qry1=((db.t2.f22==db.t1.id) && (db.t1.f12==10)) rows = db(qry1).select(db.t2.ALL) #way2 qry1=(db.t1.f12==10) leftjoin=db.t2.on(db.t2.f22==db.t1.id) rows=db(qry1).select(db.t2.ALL