Browse Source

fix SQL syntax error

main
ghost 1 year ago
parent
commit
142d496108
  1. 4
      library/mysql.php

4
library/mysql.php

@ -549,7 +549,7 @@ class MySQL {
// Cleaner tools // Cleaner tools
public function resetBannedHostPages(int $timeOffset) { public function resetBannedHostPages(int $timeOffset) {
$query = $this->_db->prepare('UPDATE `hostPage` SET `timeBanned` = NULL WHERE `timeBanned` IS NOT NULL AND `timeBanned` < ' . (int) $timeOffset); $query = $this->_db->prepare('UPDATE `hostPage` SET `timeBanned` = NULL WHERE `timeBanned` IS NOT NULL AND `timeBanned` < ?');
$query->execute([$timeOffset]); $query->execute([$timeOffset]);
@ -558,7 +558,7 @@ class MySQL {
public function resetBannedHosts(int $timeOffset) { public function resetBannedHosts(int $timeOffset) {
$query = $this->_db->prepare('UPDATE `host` SET `timeBanned` = NULL WHERE `timeBanned` IS NOT NULL AND `timeBanned` < ' . (int) $timeOffset); $query = $this->_db->prepare('UPDATE `host` SET `timeBanned` = NULL WHERE `timeBanned` IS NOT NULL AND `timeBanned` < ?');
$query->execute([$timeOffset]); $query->execute([$timeOffset]);

Loading…
Cancel
Save