Thanks guys. That's exactly what I needed.
Sorry I was not able to fint it myself...
Regards, Jon.
On Sat, Dec 29, 2018 at 4:19 AM Anthony wrote:
> See
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Grouping-and-counting
> .
>
> On Friday, December 28, 2018 at 6:4
See
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Grouping-and-counting.
On Friday, December 28, 2018 at 6:46:25 AM UTC-5, Jonsubs wrote:
>
> Hi all,
> I'd like to know how to access the ".count()" result of a query from a
> view.
>
> I have the following query in
pardon, not sure got what you want to achieve
think if you want to count the rows data, should it better to count the
data first (using compute in table constructor or count it manually before
insert to the table) before put it on table?
or do the count calculation manually on the fly (on the vie
Thanks Stifan,
I see how can I do that for the whole query.
How can I do this row-wise? Can I create a "count_db" variable per row? As
I'm grouping by game and counting how many entries I have per game (after
grouping them), I would like to show the count per row.
The closest I got so far is by p
just assign it to variable then pass it to the view
*e.g. (not tested)*
*controllers/default.py*
def index():
count_db = db(db.person.id > 0).count()
dict(count_db = count_db)
*views/default/index.html*
{{= count_db}}
*ref:*
http://web2py.com/books/default/chapter/29/06/the-database-abstr
5 matches
Mail list logo