It is not the same. GAE is pure python and the lower() operator of a
string is implemented.

In the following case

db(db.table.field.lower()==value).select( ... )

.lower is not the string operator but it is a web2py method of the
field object that is mapped into SQL

    SELECT ... WHERE LOWER(table.field)=value;

GAE has no equivalent of the LOWER(..) in SQL therefore
db.table.field.lower() cannot be mapped.

Hope it makes sense.

Massimo


On Oct 9, 9:24 pm, Joseph Jude <ceph...@gmail.com> wrote:
> it does. I did the below & it worked in gae
>
> def index():
>   sm="HELO"
>   print sm.lower()
>   return
>
> It should be something else. Also is there any other way achieve this:
> having a description (the user can input in upper or lower) finding
> out the id?
>
> Thx,
> Joseph
>
> On Oct 9, 10:33 pm, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > GAE does not support .lower()
>
> > sorry
>
> > On Oct 9, 12:31 pm, Joseph Jude <ceph...@gmail.com> wrote:
>
> > > Hi,
> > > When I execute the below code in GAE it throws an error: unsupported
> > > operand type(s) for %: 'NoneType' and 'dict'. However this works ok in
> > > a non-GAE environment. Any tips?
>
> > > print db(db.paid_by.paid_by.lower()=='cash').select(db.paid_by.ALL)[0]
> > > ['id']
>
> > > Basically what I have is the description and I want to get the
> > > corresponding id stored in the database.
>
> > > Thank you in advance,
> > > Joseph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web2py@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to