[web2py] Re: combining two queries on different table (one reference the other) - newbie db

2014-06-28 Thread Massimo Di Pierro
No. This should not produce double results: results = db(q1 & q2).select() Unless results are duplicated in database. On Saturday, 28 June 2014 07:00:27 UTC-5, Riccardo C wrote: > > Hi Massimo, > > thanks for taking time to have a look to my problem. > Regarding the first suggestion, what I was

[web2py] Re: combining two queries on different table (one reference the other) - newbie db

2014-06-28 Thread Riccardo C
Hi Massimo, thanks for taking time to have a look to my problem. Regarding the first suggestion, what I was trying to do was exactly what you corrected. The query itself doesn't work as I would: in plain english, I would like to have a complete list of users that live in a specific city AND kn

[web2py] Re: combining two queries on different table (one reference the other) - newbie db

2014-06-26 Thread Massimo Di Pierro
This is very wrong: q1 = eval('db. userLanguage.'+ language )== True what is it supposed to be? q1 = db.userLanguage[language] == True I am not sure. Once q1 is correct, this works: results = db(q1 & q2).select() On Wednesday, 25 June 2014 17:04:28 UTC-5, Riccardo C wrote: > > Dear all,