commit
41defc88fa
@ -694,9 +694,9 @@ class Statistics extends Base {
|
|||||||
IFNULL(ROUND(SUM(IF(s.difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), s.difficulty)) * POW(2, " . $this->config['target_bits'] . ") / 3600 / 1000), 0) AS hashrate,
|
IFNULL(ROUND(SUM(IF(s.difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), s.difficulty)) * POW(2, " . $this->config['target_bits'] . ") / 3600 / 1000), 0) AS hashrate,
|
||||||
HOUR(s.time) AS hour
|
HOUR(s.time) AS hour
|
||||||
FROM " . $this->share->getTableName() . " AS s, accounts AS a
|
FROM " . $this->share->getTableName() . " AS s, accounts AS a
|
||||||
WHERE time < NOW() - INTERVAL 1 HOUR
|
WHERE time <= FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(NOW())/(60*60))*(60*60))
|
||||||
|
AND time >= FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(NOW())/(60*60))*(60*60)) - INTERVAL 24 HOUR
|
||||||
AND our_result = 'Y'
|
AND our_result = 'Y'
|
||||||
AND time > NOW() - INTERVAL 25 HOUR
|
|
||||||
AND a.username = SUBSTRING_INDEX( s.username, '.', 1 )
|
AND a.username = SUBSTRING_INDEX( s.username, '.', 1 )
|
||||||
AND a.id = ?
|
AND a.id = ?
|
||||||
GROUP BY HOUR(time)
|
GROUP BY HOUR(time)
|
||||||
@ -706,9 +706,9 @@ class Statistics extends Base {
|
|||||||
IFNULL(ROUND(SUM(IF(s.difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), s.difficulty)) * POW(2, " . $this->config['target_bits'] . ") / 3600 / 1000), 0) AS hashrate,
|
IFNULL(ROUND(SUM(IF(s.difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), s.difficulty)) * POW(2, " . $this->config['target_bits'] . ") / 3600 / 1000), 0) AS hashrate,
|
||||||
HOUR(s.time) AS hour
|
HOUR(s.time) AS hour
|
||||||
FROM " . $this->share->getArchiveTableName() . " AS s, accounts AS a
|
FROM " . $this->share->getArchiveTableName() . " AS s, accounts AS a
|
||||||
WHERE time < NOW() - INTERVAL 1 HOUR
|
WHERE time <= FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(NOW())/(60*60))*(60*60))
|
||||||
|
AND time >= FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(NOW())/(60*60))*(60*60)) - INTERVAL 24 HOUR
|
||||||
AND our_result = 'Y'
|
AND our_result = 'Y'
|
||||||
AND time > NOW() - INTERVAL 25 HOUR
|
|
||||||
AND a.username = SUBSTRING_INDEX( s.username, '.', 1 )
|
AND a.username = SUBSTRING_INDEX( s.username, '.', 1 )
|
||||||
AND a.id = ?
|
AND a.id = ?
|
||||||
GROUP BY HOUR(time)");
|
GROUP BY HOUR(time)");
|
||||||
@ -737,8 +737,8 @@ class Statistics extends Base {
|
|||||||
IFNULL(ROUND(SUM(IF(s.difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), s.difficulty)) * POW(2, " . $this->config['target_bits'] . ") / 3600 / 1000), 0) AS hashrate,
|
IFNULL(ROUND(SUM(IF(s.difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), s.difficulty)) * POW(2, " . $this->config['target_bits'] . ") / 3600 / 1000), 0) AS hashrate,
|
||||||
HOUR(s.time) AS hour
|
HOUR(s.time) AS hour
|
||||||
FROM " . $this->share->getTableName() . " AS s
|
FROM " . $this->share->getTableName() . " AS s
|
||||||
WHERE time < NOW() - INTERVAL 1 HOUR
|
WHERE time <= FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(NOW())/(60*60))*(60*60))
|
||||||
AND time > NOW() - INTERVAL 25 HOUR
|
AND time >= FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(NOW())/(60*60))*(60*60)) - INTERVAL 24 HOUR
|
||||||
AND our_result = 'Y'
|
AND our_result = 'Y'
|
||||||
GROUP BY HOUR(time)
|
GROUP BY HOUR(time)
|
||||||
UNION
|
UNION
|
||||||
@ -747,8 +747,8 @@ class Statistics extends Base {
|
|||||||
IFNULL(ROUND(SUM(IF(s.difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), s.difficulty)) * POW(2, " . $this->config['target_bits'] . ") / 3600 / 1000), 0) AS hashrate,
|
IFNULL(ROUND(SUM(IF(s.difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), s.difficulty)) * POW(2, " . $this->config['target_bits'] . ") / 3600 / 1000), 0) AS hashrate,
|
||||||
HOUR(s.time) AS hour
|
HOUR(s.time) AS hour
|
||||||
FROM " . $this->share->getArchiveTableName() . " AS s
|
FROM " . $this->share->getArchiveTableName() . " AS s
|
||||||
WHERE time < NOW() - INTERVAL 1 HOUR
|
WHERE time <= FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(NOW())/(60*60))*(60*60))
|
||||||
AND time > NOW() - INTERVAL 25 HOUR
|
AND time >= FROM_UNIXTIME(FLOOR(UNIX_TIMESTAMP(NOW())/(60*60))*(60*60)) - INTERVAL 24 HOUR
|
||||||
AND our_result = 'Y'
|
AND our_result = 'Y'
|
||||||
GROUP BY HOUR(time)");
|
GROUP BY HOUR(time)");
|
||||||
if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result()) {
|
if ($this->checkStmt($stmt) && $stmt->execute() && $result = $stmt->get_result()) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user