From ce78e8b59d315ba109e1d236383d5b8fdd336a06 Mon Sep 17 00:00:00 2001 From: r4sas Date: Sat, 12 May 2018 13:25:13 +0000 Subject: [PATCH] revert changes for mysql ifnull functions --- include/classes/statistics.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/classes/statistics.class.php b/include/classes/statistics.class.php index 1e258c3f..bd798454 100644 --- a/include/classes/statistics.class.php +++ b/include/classes/statistics.class.php @@ -575,9 +575,9 @@ class Statistics extends Base { if ($this->getGetCache() && $data = $this->memcache->get(__FUNCTION__ . $account_id)) return $data; $stmt = $this->mysqli->prepare(" SELECT - IFNULL(SUM(difficulty) / ?, " . $this->coin->getShareDifficultyPrecision() . ") AS sharerate, - IFNULL(SUM(difficulty), " . $this->coin->getShareDifficultyPrecision() . ") AS shares, - IFNULL(AVG(difficulty), " . $this->coin->getShareDifficultyPrecision() . ") AS avgsharediff + IFNULL(SUM(difficulty) / ?, 0) AS sharerate, + IFNULL(SUM(difficulty), 0) AS shares, + IFNULL(AVG(difficulty), 0) AS avgsharediff FROM ( SELECT id, our_result, IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty