Merge pull request #1956 from barrybingo/development
[FIX] Remove a couple more static table references
This commit is contained in:
commit
0617246b0f
@ -70,8 +70,8 @@ class Transaction extends Base {
|
|||||||
$sql = "
|
$sql = "
|
||||||
SELECT
|
SELECT
|
||||||
SUM(t.amount) AS total, t.type AS type
|
SUM(t.amount) AS total, t.type AS type
|
||||||
FROM transactions AS t
|
FROM $this->table AS t
|
||||||
LEFT OUTER JOIN blocks AS b
|
LEFT OUTER JOIN " . $this->block->getTableName() . " AS b
|
||||||
ON b.id = t.block_id
|
ON b.id = t.block_id
|
||||||
WHERE ( b.confirmations > 0 OR b.id IS NULL )";
|
WHERE ( b.confirmations > 0 OR b.id IS NULL )";
|
||||||
if (!empty($account_id)) {
|
if (!empty($account_id)) {
|
||||||
@ -211,7 +211,7 @@ class Transaction extends Base {
|
|||||||
FROM $this->table AS t
|
FROM $this->table AS t
|
||||||
LEFT JOIN " . $this->user->getTableName() . " AS a
|
LEFT JOIN " . $this->user->getTableName() . " AS a
|
||||||
ON t.account_id = a.id
|
ON t.account_id = a.id
|
||||||
LEFT JOIN blocks AS b
|
LEFT JOIN " . $this->block->getTableName() . " AS b
|
||||||
ON t.block_id = b.id
|
ON t.block_id = b.id
|
||||||
WHERE
|
WHERE
|
||||||
(
|
(
|
||||||
@ -306,9 +306,9 @@ class Transaction extends Base {
|
|||||||
), 0
|
), 0
|
||||||
) AS confirmed
|
) AS confirmed
|
||||||
FROM $this->table AS t
|
FROM $this->table AS t
|
||||||
LEFT JOIN blocks AS b
|
LEFT JOIN " . $this->block->getTableName() . " AS b
|
||||||
ON t.block_id = b.id
|
ON t.block_id = b.id
|
||||||
LEFT JOIN accounts AS a
|
LEFT JOIN " . $this->user->getTableName() . " AS a
|
||||||
ON t.account_id = a.id
|
ON t.account_id = a.id
|
||||||
WHERE t.archived = 0 AND a.ap_threshold > 0 AND a.coin_address IS NOT NULL AND a.coin_address != ''
|
WHERE t.archived = 0 AND a.ap_threshold > 0 AND a.coin_address IS NOT NULL AND a.coin_address != ''
|
||||||
GROUP BY t.account_id
|
GROUP BY t.account_id
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user