[FIX] Remove old query remnants

This commit is contained in:
Neozonz 2014-01-21 20:14:44 -05:00
parent 3222792533
commit 934825e8dc

View File

@ -513,7 +513,7 @@ class Statistics extends Base {
IFNULL(IF(our_result='Y', ROUND(SUM(IF(difficulty=0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty)) * POW(2, " . $this->config['target_bits'] . ") / ? / 1000), 0), 0) AS hashrate IFNULL(IF(our_result='Y', ROUND(SUM(IF(difficulty=0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty)) * POW(2, " . $this->config['target_bits'] . ") / ? / 1000), 0), 0) AS hashrate
FROM ( FROM (
SELECT SELECT
id, our_result, IF(s.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
FROM FROM
shares shares
WHERE username LIKE ? WHERE username LIKE ?
@ -521,7 +521,7 @@ class Statistics extends Base {
AND our_result = 'Y' AND our_result = 'Y'
UNION UNION
SELECT SELECT
share_id, our_result, IF(s.difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty share_id, our_result, IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty
FROM FROM
shares_archive shares_archive
WHERE username LIKE ? WHERE username LIKE ?