Now you can also do db(db.item) instead of db(db.item.id>0), so
db(db.item).count(). You can also use count() as an aggregate function in a
select, as described
here: http://web2py.com/book/default/chapter/06#Grouping-and-Counting. If
you just need to check whether a table is empty, a more effi
query=(db.item.id>0)
db(query).count()
On 10/23/11, lucas wrote:
> hello one and all,
>
> i think this is easy. how do you get the actual record/row total/
> count for a particular table in web2py under DAL? thank you in
> advance and have a great weekend.
>
> lucas
hello one and all,
i think this is easy. how do you get the actual record/row total/
count for a particular table in web2py under DAL? thank you in
advance and have a great weekend.
lucas
3 matches
Mail list logo