[FIX] Remove more static table references #1929

This commit is contained in:
Boris 2014-03-17 12:55:13 +00:00
parent 38177c9692
commit 0e61aaa9fe

View File

@ -462,7 +462,7 @@ class Statistics extends Base {
id, id,
IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty, IF(difficulty = 0, POW(2, (" . $this->config['difficulty'] . " - 16)), difficulty) AS difficulty,
username username
FROM shares FROM " . $this->share->getTableName() . "
WHERE time > DATE_SUB(now(), INTERVAL ? SECOND) AND our_result = 'Y' WHERE time > DATE_SUB(now(), INTERVAL ? SECOND) AND our_result = 'Y'
UNION UNION
SELECT SELECT
@ -533,7 +533,7 @@ class Statistics extends Base {
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
FROM FROM
shares " . $this->share->getTableName() . "
WHERE username LIKE ? WHERE username LIKE ?
AND time > DATE_SUB(now(), INTERVAL ? SECOND) AND time > DATE_SUB(now(), INTERVAL ? SECOND)
AND our_result = 'Y' AND our_result = 'Y'
@ -541,7 +541,7 @@ class Statistics extends Base {
SELECT SELECT
share_id, our_result, IF(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 " . $this->share->getArchiveTableName() . "
WHERE username LIKE ? WHERE username LIKE ?
AND time > DATE_SUB(now(), INTERVAL ? SECOND) AND time > DATE_SUB(now(), INTERVAL ? SECOND)
AND our_result = 'Y' AND our_result = 'Y'