Re: [web2py] DAL total record count

2011-10-22 Thread Anthony
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

Re: [web2py] DAL total record count

2011-10-22 Thread Phyo Arkar
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

[web2py] DAL total record count

2011-10-22 Thread 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