actually I was looking alternative of sql statement like *select **name, dob date_of_birth, occupation from persons* in web2py DAL.
anyways, after retrieving, when I print rows.colnames[3] it returns str: persons.dob but setting rows.colnames[3] to 'date_of_birth' gives error *rows.colnames[3] = 'date_of_birth' *<type 'exceptions.AttributeError'> 'Row' object has no attribute '_extra' regards On Wednesday, 6 March 2013 14:34:30 UTC+5, Niphlod wrote: > > you can do it after retrieving it. After all, you define a model to be > consistent ^_^ . > PS: the resultset is ~ a list of dictionaries, so you can play with it > freely. > > On Wednesday, March 6, 2013 10:21:39 AM UTC+1, at wrote: >> >> actually I wanted to change this label just in current record set, I mean >> in *rows* only; is it possible? >> >> thanks >> >> On Wednesday, 6 March 2013 14:18:32 UTC+5, 黄祥 wrote: >>> >>> i'm usually use it on models for : >>> db.person.dob.label=T('Date of Birth') >>> the other solution is to use labels in form (SQLFORM, CRUD, GRID) >>> http://web2py.com/books/default/chapter/29/07 >>>> >>>> -- --- 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. For more options, visit https://groups.google.com/groups/opt_out.