When dealing with 1 table, names are "short names" When dealing with multiple tables, all names are fully qualified.
-Thadeus On Mon, Apr 5, 2010 at 8:22 PM, fgpy <franck...@gmail.com> wrote: > More details here: > > I have 2 tables: shop (2 fields) and enquete (18 fields). > > I use an inner join like the one bellow. > 'shop.shop_code' is what I call a fully qualified name > 'hht_q_1' is what I call a short name. All those names end to be in > _extra and as they contain some unicode, the __str__ method of Rows > fails. > > Putting 'enquete' in front of all the names makes the code less > readable, therefore using short names linking to the colums returned > by the inner join. > > rows = db(db.enquete.shop_code==db.shop.shop_code).select( > 'shop.shop_code', 'shop.shop_name', > 'hht_q_1', 'hht_q_2', 'hht_q_3', 'hht_q_4', 'hht_q_5', > 'hht_q_6', 'hht_q_7', 'hht_q_8', 'hht_q_9', > 'pc_q_1', 'pc_q_2', 'pc_q_3', 'pc_q_4', 'pc_q_5', > 'pc_q_6', 'pc_q_7', > ) > > Please advise. > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.