diff --git a/public/include/classes/statistics.class.php b/public/include/classes/statistics.class.php index 7a259d28..38f5360a 100644 --- a/public/include/classes/statistics.class.php +++ b/public/include/classes/statistics.class.php @@ -398,7 +398,7 @@ class Statistics { if ($this->getGetCache() && $data = $this->memcache->get(__FUNCTION__ . $account_id)) return $data; $stmt = $this->mysqli->prepare(" SELECT - AVG(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty)) AS avgsharediff, + IFNULL(AVG(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty)), 0) AS avgsharediff, COUNT(s.id) AS total FROM " . $this->share->getTableName() . " AS s JOIN " . $this->user->getTableName() . " AS a ON a.username = SUBSTRING_INDEX( s.username, '.', 1 )