Re: [web2py] DAL join field access

2022-09-10 Thread lucas
yes, that worked perfectly. thank you massimiliano. lucas On Saturday, September 10, 2022 at 12:43:30 PM UTC-4 Massimiliano wrote: > Hi, > > I'm not sure to have understand correctly your question, but maybe you > need to use aliases: > > fields = [ > db.table1.id.with_alias('id'), > d

Re: [web2py] DAL join field access

2022-09-10 Thread Massimiliano
Hi, I'm not sure to have understand correctly your question, but maybe you need to use aliases: fields = [ db.table1.id.with_alias('id'), db.table2.last_name.with_alias('last_name') ] db(yourquery).select(*fields) Il giorno sab 10 set 2022 alle ore 13:47 lucas ha scritto: > hello o

[web2py] DAL join field access

2022-09-10 Thread lucas
hello one and all, you know how when you do a select join and the records come back where you have to access the field values by like db.table1.id or db.table2.last_name? and i know that under the select we can do like db.table1.ALL and db.table2.last_name, but we still have to access the fie

[web2py] DAL - join on ROW_NUMBER()

2015-09-27 Thread lfestevao
Hy there, I have a query ready and works alright with executesql. I'm trying to change queries to use the dal but there's a problem in this case. I have 2 tables related only by entry order, not by id's or some other key. It's a legacy database and these info are in separate tables because these

[web2py] DAL Join

2014-02-19 Thread contact . urbangatherer
Hi, Maybe a stupid question but here goes. I am trying to do the following join. row = db(db.weets.posted_by==user).select(join=db.auth_user.on(db.weets.posted_by==db.auth_user.id)) its seems to work and row does return. The example in the book then shows you can use attributes but when i try: