From: Marcel Werk Date: Thu, 11 Jul 2013 18:00:25 +0000 (+0200) Subject: Fixed SQL query X-Git-Tag: 2.0.0_Beta_5~73^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2444d8f5da17eeab49c746bcb7902e46dca14d6;p=GitHub%2FWoltLab%2FWCF.git Fixed SQL query --- 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);