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
Nearly forgot to come back, sorry for delay...
Switching "&" for "and" fixed my immediate problem and as usual I learnt
more interesting stuff from your answer.
Many thanks
Ed
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source
> In a DAL query, you must use & rather than and. By using the latter, you
> are getting the standard Python behavior, whereby x and y simply yeilds y.
>
Just to be clear, if x evaluates to a falsey value (e.g., 0, '', []), then x
and y instead yields x.
Anthony
--
Resources:
-
> >>> row2=db((db.entry.acc_id==db.acc.id) and (db.entry.txn_id==1)).select
> ().first()
>
In a DAL query, you must use & rather than and. By using the latter, you
are getting the standard Python behavior, whereby x and y simply yeilds y.
So, in this case, your query is equivalent to simply
4 matches
Mail list logo