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 <sjluk...@gmail.com> ha scritto: > 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 > field values by like db.table1.id or db.table2.last_name? > > is there a way to collapse the fields so that we can just use id or > last_name, especially when we're certain that the fields are unique when we > collapse when we specify the fields under the select? > > thank you in advance, lucas > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/web2py/cfb499ac-7e22-4bfa-b702-99ac5d8924d5n%40googlegroups.com > <https://groups.google.com/d/msgid/web2py/cfb499ac-7e22-4bfa-b702-99ac5d8924d5n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Massimiliano -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/CANPTPxLePgHqxzrPva%2B-dy_B_4F9JLRjwzxXG%3D6zfR4Dq6_iuw%40mail.gmail.com.