Hello
i am trying to translate this piece of code in web2py dialect:
cur.execute("select * from prodotti where SupplierID=?",[fornitore])
(this give me correct results)

i tried with
prodotti = legacy_db().select(legacy_db.prodotti.SupplierID==fornitore)
but i got error:
AttributeError: 'Query' object has no attribute 'type'

Then i tried with:
prodotti = legacy_db(legacy_db.prodotti.SupplierID==fornitore).select( )
and this worked.
My questio is : why the first form does not work?
Shuoldn't they be equivalent?
how should i translate the where condition in the select part?
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.

Reply via email to