From d2444d8f5da17eeab49c746bcb7902e46dca14d6 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Thu, 11 Jul 2013 20:00:25 +0200 Subject: [PATCH] Fixed SQL query --- .../data/attachment/AdministrativeAttachmentList.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/data/attachment/AdministrativeAttachmentList.class.php b/wcfsetup/install/files/lib/data/attachment/AdministrativeAttachmentList.class.php index be3b5d896b..58bcd52d38 100644 --- a/wcfsetup/install/files/lib/data/attachment/AdministrativeAttachmentList.class.php +++ b/wcfsetup/install/files/lib/data/attachment/AdministrativeAttachmentList.class.php @@ -76,8 +76,8 @@ class AdministrativeAttachmentList extends AttachmentList { */ public function getStats() { $sql = "SELECT COUNT(*) AS count, - IFNULL(SUM(attachment.filesize), 0) AS size, - IFNULL(SUM(downloads), 0) AS downloads + COALESCE(SUM(attachment.filesize), 0) AS size, + COALESCE(SUM(downloads), 0) AS downloads FROM wcf".WCF_N."_attachment attachment ".$this->getConditionBuilder(); $statement = WCF::getDB()->prepareStatement($sql); -- 2.20.1