Another way could be: names = queryselect(func.upper(users.c.username) == "john".upper())
I use this instead of the like/ilike approach since it is more useful when using indexes (at least that's what i found for postgresql). That is, of course, if you have an index on UPPER(username). Hope it helps, Luciano. On Apr 18, 9:01 am, Disrupt07 <[EMAIL PROTECTED]> wrote: > I have a users table and I want to query the usernames column. I want > my query to be case insensitive. > > So the following searches should all match "John": "john", "jOhn", > "johN, "JOhn", and so on. > > My query at the moment is a follows: > names = queryselect(users.c.username == "john") > > How can I modify the query to obtain case insensitive search? > > Thanks --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

