@@ 166-170 (lines=5) @@ | ||
163 | if (!isset($this->config['archive']['purge'])) $this->config['archive']['purge'] = 5; |
|
164 | ||
165 | $stmt = $this->mysqli->prepare("SELECT CEIL(COUNT(id) / 100 * ?) AS count FROM $this->tableArchive"); |
|
166 | if ($this->checkStmt($stmt) && $stmt->bind_param('i', $this->config['archive']['purge']) && $stmt->execute() && $result = $stmt->get_result()) { |
|
167 | $limit = $result->fetch_object()->count; |
|
168 | } else { |
|
169 | return $this->sqlError(); |
|
170 | } |
|
171 | $stmt->close(); |
|
172 | $stmt = $this->mysqli->prepare(" |
|
173 | DELETE FROM $this->tableArchive WHERE time < ( |
@@ 309-311 (lines=3) @@ | ||
306 | LEFT JOIN " . $this->block->getTableName() . " AS b |
|
307 | ON t.block_id = b.id |
|
308 | WHERE archived = 0"); |
|
309 | if ($this->checkStmt($stmt) && $stmt->bind_param('ii', $this->config['confirmations'], $this->config['confirmations']) && $stmt->execute() && $stmt->bind_result($dBalance) && $stmt->fetch()) |
|
310 | return $dBalance; |
|
311 | return $this->sqlError(); |
|
312 | } |
|
313 | ||
314 | /** |
|
@@ 378-380 (lines=3) @@ | ||
375 | GROUP BY t.account_id |
|
376 | HAVING confirmed > ca.ap_threshold AND confirmed > " . $this->config['txfee_auto'] . " |
|
377 | LIMIT ?"); |
|
378 | if ($this->checkStmt($stmt) && $stmt->bind_param('si', $this->config['currency'], $limit) && $stmt->execute() && $result = $stmt->get_result()) |
|
379 | return $result->fetch_all(MYSQLI_ASSOC); |
|
380 | return $this->sqlError(); |
|
381 | } |
|
382 | ||
383 | ||
@@ 473-475 (lines=3) @@ | ||
470 | GROUP BY t.account_id |
|
471 | HAVING confirmed > " . $this->config['txfee_manual'] . " |
|
472 | LIMIT ?"); |
|
473 | if ($this->checkStmt($stmt) && $stmt->bind_param('si', $this->config['currency'], $limit) && $stmt->execute() && $result = $stmt->get_result()) |
|
474 | return $result->fetch_all(MYSQLI_ASSOC); |
|
475 | return $this->sqlError('E0050'); |
|
476 | } |
|
477 | } |
|
478 |
@@ 365-367 (lines=3) @@ | ||
362 | WHERE ca.ap_threshold > 0 AND ca.currency = ? |
|
363 | AND ca.coin_address IS NOT NULL |
|
364 | "); |
|
365 | if ( $this->checkStmt($stmt) && $stmt->bind_param('s', $this->config['currency']) && $stmt->execute() && $result = $stmt->get_result()) { |
|
366 | return $result->fetch_all(MYSQLI_ASSOC); |
|
367 | } |
|
368 | $this->debug->append("Unable to fetch users with AP set"); |
|
369 | return false; |
|
370 | } |