Skip to content

Commit ce78e8b

Browse files
committedMay 12, 2018
revert changes for mysql ifnull functions
1 parent b183ff1 commit ce78e8b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎include/classes/statistics.class.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -575,9 +575,9 @@ public function getUserMiningStats($username, $account_id=NULL, $interval=180) {
575575
if ($this->getGetCache() && $data = $this->memcache->get(__FUNCTION__ . $account_id)) return $data;
576576
$stmt = $this->mysqli->prepare("
577577
SELECT
578-
IFNULL(SUM(difficulty) / ?, " . $this->coin->getShareDifficultyPrecision() . ") AS sharerate,
579-
IFNULL(SUM(difficulty), " . $this->coin->getShareDifficultyPrecision() . ") AS shares,
580-
IFNULL(AVG(difficulty), " . $this->coin->getShareDifficultyPrecision() . ") AS avgsharediff
578+
IFNULL(SUM(difficulty) / ?, 0) AS sharerate,
579+
IFNULL(SUM(difficulty), 0) AS shares,
580+
IFNULL(AVG(difficulty), 0) AS avgsharediff
581581
FROM (
582582
SELECT
583583
id, our_result, IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty

0 commit comments

Comments
 (0)
Please sign in to comment.