A dict can have multiple keys, so feel free to return a dict that includes 
all three results. Of course, you can also put all three values into a 
single object (e.g., a dict, list, or tuple), and then just return that 
single object to the view.

Anthony

On Tuesday, March 20, 2018 at 9:59:21 AM UTC-4, En Ware wrote:
>
> Hello, 
>
>     Trying to get the full count on three different tables. Below is a 
> sample code. I am only able to call one count at a time. Is it possible to 
> query all three of these and show them in a view?  
>
> def index():
>     get_foxtel_count=db(db.foxtel_hunter.id > 0).count()
>     get_lgi_count=db(db.lgi_hunter.id > 0).count()
>     get_adobe_count=db(db.adobe_hunter.id > 0).count()
>     #return dict(get_foxtel_count=get_foxtel_count)
>     #return dict(get_lgi_count=get_lgi_count)
>     #return dict(get_adobe_count=get_adobe_count)
>
>     return dict()
>
>
>

-- 
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/d/optout.

Reply via email to