revert changes for mysql ifnull functions
This commit is contained in:
parent
b183ff19bd
commit
ce78e8b59d
@ -575,9 +575,9 @@ class Statistics extends Base {
|
|||||||
if ($this->getGetCache() && $data = $this->memcache->get(__FUNCTION__ . $account_id)) return $data;
|
if ($this->getGetCache() && $data = $this->memcache->get(__FUNCTION__ . $account_id)) return $data;
|
||||||
$stmt = $this->mysqli->prepare("
|
$stmt = $this->mysqli->prepare("
|
||||||
SELECT
|
SELECT
|
||||||
IFNULL(SUM(difficulty) / ?, " . $this->coin->getShareDifficultyPrecision() . ") AS sharerate,
|
IFNULL(SUM(difficulty) / ?, 0) AS sharerate,
|
||||||
IFNULL(SUM(difficulty), " . $this->coin->getShareDifficultyPrecision() . ") AS shares,
|
IFNULL(SUM(difficulty), 0) AS shares,
|
||||||
IFNULL(AVG(difficulty), " . $this->coin->getShareDifficultyPrecision() . ") AS avgsharediff
|
IFNULL(AVG(difficulty), 0) AS avgsharediff
|
||||||
FROM (
|
FROM (
|
||||||
SELECT
|
SELECT
|
||||||
id, our_result, IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty
|
id, our_result, IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user