[support] Printing "0" when a db query returns nothing
Ivan Sergio Borgonovo
mail at webthatworks.it
Fri Apr 9 18:29:44 UTC 2010
On Fri, 9 Apr 2010 15:12:39 -0300
"Neil Coghlan" <neil at esl-lounge.com> wrote:
> the file_downloads table only has records of files that have been
OK that exclude the problem of a null + not null.
Still if there isn't one set a not null default 0 on the
file_downloads.count column.
> > sum() is going to return a 0 if NO record was returned.
BTW this is wrong. sum() != count()
My fault.
--
Ivan Sergio Borgonovo
http://www.webthatworks.it
More information about the support
mailing list