Hello to everybody,
I have a question, please answer for me!
In the model, I define a field:
*db.define_table('mytable',*
* Field('is_imported', 'boolean', default =
False), ...)*
*db.**mytable*
*.insert(is_imported = True,..)*
*db.**mytable**.insert(is_imported = False,..)*
In the controller, I write:
*records = db(db.mytable.id).select(db.mytable.is_imported)*
*for record in records:*
* print record.**is_imported*
Result:
*False*
* False*
Expected result:
*True*
* False*
And I see with boolean fields, command select always return *False *for
every values (0, 1) in mssql.
I were trying with all mssql and mssql2, they had same result.
Please tell me why.
Thanks.
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.