From 03e9a7abbf2851f3f8ac4c9a1d0bc072f4a9e103 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Thu, 5 Feb 2015 21:52:43 +0100 Subject: service/files::history: Fix total_size if no results Signed-off-by: Florian Pritz --- application/service/files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/service/files.php b/application/service/files.php index 962939c87..59a096d1b 100644 --- a/application/service/files.php +++ b/application/service/files.php @@ -27,7 +27,7 @@ class files { } $total_size = $CI->db->query(" - SELECT sum(filesize) sum + SELECT coalesce(sum(filesize), 0) sum FROM ( SELECT DISTINCT hash, filesize FROM `".$CI->db->dbprefix."files` -- cgit v1.2.3-24-g4f1b