On Sunday, March 27, 2016 at 10:31:37 PM UTC-4, Alfonso Serra wrote:
>
> Sorted out with:
> rows = db(db.mytable).select(*[db.mytable[f] for f in
> db.mytable.fields[0:5])
>
Yes, .select() takes field objects, not just field names. Iterating over
the table object itself yields its field
Sorted out with:
rows = db(db.mytable).select(*[db.mytable[f] for f in
db.mytable.fields[0:5])
--
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
2 matches
Mail list logo