[web2py] Re: question about count() [closed]

2011-07-03 Thread weheh
On Jul 3, 12:20 pm, Bruno Rocha wrote: > the only argument you can pass to count() is a fieldname, so it will count > using DISTINCT > > >>> db(db.products.id>0)._count('id') > > 'SELECT count(DISTINCT id) FROM products WHERE (products.id > 0)' > > Left Joins are Row objects, so this object is a

[web2py] Re: question about count()

2011-07-03 Thread weheh
Thanks Bruno for the response. Yes, that's what I do -- I almost never use ALL unless I really need it. I'm into minimal overhead at ALL times. On Jul 3, 12:20 pm, Bruno Rocha wrote: > the only argument you can pass to count() is a fieldname, so it will count > using DISTINCT > > >>> db(db.produc