Maybe db.executeslq(''' Plain SQL Query Here ''')

Richard


On Sun, Feb 16, 2014 at 9:24 AM, 黄祥 <steve.van.chris...@gmail.com> wrote:

> tried to simplyfied test the query in the shell but got no result (no
> error occured).
> e.g.
> In [4] : sum = db.purchase_detail.quantity.sum()
> print db().select(sum).first()[sum]
>
> In [5] : for row in db(db.product).select():
> print row.name
> product0
> product1
> product2
>
> In [6] : for row in db(db.purchase_detail).select():
> print row.quantity
> 1
> 1
>
> any idea how to achieve it? or perhaps i define it on the views, not in
> the controllers, is it affect the query result?
>
> thanks and best regards,
> stifan
>
> --
> 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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to