parent
96066993ac
commit
56cfa24eb4
@ -110,7 +110,16 @@ class Worker {
|
|||||||
WHERE
|
WHERE
|
||||||
username = w.username
|
username = w.username
|
||||||
AND time > DATE_SUB(now(), INTERVAL 10 MINUTE)
|
AND time > DATE_SUB(now(), INTERVAL 10 MINUTE)
|
||||||
) AS hashrate
|
) AS hashrate,
|
||||||
|
(
|
||||||
|
SELECT IFNULL(IF(our_result='Y', ROUND(SUM(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty)) / COUNT(id), 2), 0), 0)
|
||||||
|
FROM " . $this->share->getTableName() . "
|
||||||
|
WHERE username = w.username AND time > DATE_SUB(now(), INTERVAL 10 MINUTE)
|
||||||
|
) + (
|
||||||
|
SELECT IFNULL(IF(our_result='Y', ROUND(SUM(IF(difficulty=0, pow(2, (" . $this->config['difficulty'] . " - 16)), difficulty)) / COUNT(id), 2), 0), 0)
|
||||||
|
FROM " . $this->share->getArchiveTableName() . "
|
||||||
|
WHERE username = w.username AND time > DATE_SUB(now(), INTERVAL 10 MINUTE)
|
||||||
|
) AS difficulty
|
||||||
FROM $this->table AS w
|
FROM $this->table AS w
|
||||||
WHERE id = ?
|
WHERE id = ?
|
||||||
");
|
");
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user