Hey,
My answer won't answer your question directly - but Massimo made some
amazing videos which I came across the other day:
https://vimeo.com/album/3016728 - check out no.10 and 11 for details on the
DAL he goes into detail about queries etc.
Being a complete beginner they have really helped me understand some
concepts.
On Saturday, 14 November 2015 19:54:26 UTC, Edward Shave wrote:
>
> I'm sorry if all this is in the book but I can't find it..
>
> I never quite know what to expect when selecting records. Does the book
> make this clear and I missed it. If not what are the criteria that
> determine the output format?
>
> See below where I was initially using a simplified version (row1), then
> later when I added the filter (row2) the output format changed so I have to
> go rewrite code to suit.
>
> >>> row1=db(db.entry.acc_id==db.acc.id).select().first()
> >>> print row1
>
> <Row {'acc': {'id': 2L, 'name': 'Bank'}, 'entry': {'acc_id': 2L, 'txn_id':
> 1L, 'credit': 0.0, 'debit': 456.0, 'id': 54L}}>
> >>>
> >>> row2=db((db.entry.acc_id==db.acc.id) and (db.entry.txn_id==1)).select
> ().first()
>
> >>> print row2
> <Row {'acc_id': 2L, 'txn_id': 1L, 'credit': 0.0, 'debit': 456.0, 'id': 54L
> }>
> >>>
>
> Also is there some way to force DAL simply return rows containing just
> values, maybe in the form of list of lists?
>
> Apologies if this turns out to be a silly question but I have been coding
> for a long period without sleep ;o)
>
>
--
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.