[FIX] Added where clause for archived
This commit is contained in:
parent
7a2e6061ab
commit
7b41a75f92
@ -40,8 +40,11 @@ class Transaction extends Base {
|
||||
LEFT JOIN " . $this->block->getTableName() . " AS b
|
||||
ON b.id = t.block_id
|
||||
SET t.archived = 1
|
||||
WHERE ( t.account_id = ? AND t.id <= ? AND b.confirmations >= ? )
|
||||
OR ( t.account_id = ? AND t.id <= ? AND t.type IN ( 'Credit_PPS', 'Donation_PPS', 'Fee_PPS', 'TXFee', 'Debit_MP', 'Debit_AP' ) )");
|
||||
WHERE t.archived = 0
|
||||
AND (
|
||||
( t.account_id = ? AND t.id <= ? AND b.confirmations >= ? )
|
||||
OR ( t.account_id = ? AND t.id <= ? AND t.type IN ( 'Credit_PPS', 'Donation_PPS', 'Fee_PPS', 'TXFee', 'Debit_MP', 'Debit_AP' ) )
|
||||
)");
|
||||
if ($this->checkStmt($stmt) && $stmt->bind_param('iiiii', $account_id, $txid, $this->config['confirmations'], $account_id, $txid) && $stmt->execute())
|
||||
return true;
|
||||
return $this->sqlError();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user