On Thursday, 17 October 2013 14:29:17 UTC+11, Tim Richardson wrote: > > This is web2py 2.7.4, on Windows, python 2.7.5 > > I have rows in an sqlite table with a boolean field. Currently all rows > have this field set to 0 (via an update query in an sqlite console) > > When the table is defined in the web2py model as boolean, this query > returns no rows: > > query_rows = db(db.order_status.sent_order_rcvd_email == False).select() > > but if the table definition changes the field type to integer, > the query works. > > Seems a bit weird. I thought I would have run into this problem earlier > unless it is recent behaviour. > > Ah. A bit of a gotcha perhaps. sqlite defines boolean as an integer value (0 or 1) but web2py uses a 1 char 'T' or 'F'.
-- 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/groups/opt_out.