If you want to do that not using executesql() you need to alter all the Row
dicts in the resultset. Altering the colnames is not even documented
On Thursday, March 7, 2013 6:55:05 AM UTC+1, at wrote:
>
>
> actually I was looking alternative of sql statement like *select **name,
> dob date_o
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
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
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 (SQ
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.
T
thanks for the swift response!
when this label statement should be run ... before or after running *
db().select*?
regards
On Wednesday, 6 March 2013 13:29:21 UTC+5, 黄祥 wrote:
>
> yes, it can please use label
> e.g.
> db.person.dob.label=T('Date of Birth')
>
> or if you use sqltable you can use
yes, it can please use label
e.g.
db.person.dob.label=T('Date of Birth')
or if you use sqltable you can use headers
http://web2py.com/books/default/chapter/29/06#Serializing-Rows-in-views
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To
7 matches
Mail list logo