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 efficient method is 
db(db.item).is_empty().

Anthony

On Saturday, October 22, 2011 6:25:02 PM UTC-4, Phyo Arkar wrote:
>
> query=(db.item.id>0)
> db(query).count()
>
> On 10/23/11, lucas <sjlu...@gmail.com> 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
>

Reply via email to