On Wednesday, July 20, 2016 at 12:35:44 PM UTC-7, web2py...@gmail.com wrote: > > Actually found out i was using the non datetime version of the date in the > database... Thanks all for the help. > > Secondary question. after i get this question i run a query with a > following code: > > query = db.table.id > 0 > if fruit: > query &= db.table.fruit == fruit > > however, the database stores this variable as capital so "APPLE" but when > i put in "apple" the query returns nothing.. is there a way to resolve this? > > > You may want to use the contains and/or like operator (equivalent to SQL's LIKE) which can be made case-insensitive. Using the equality operator (==) is the strictest comparison you can use for this.
<URL:http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#like--ilike--regexp--startswith--endswith--contains--upper--lower> /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.