From 142d496108a94d47b1e3eda18368569db1f4f19a Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 5 Aug 2023 19:31:29 +0300 Subject: [PATCH] fix SQL syntax error --- library/mysql.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/mysql.php b/library/mysql.php index 1b1fde6..64b268a 100644 --- a/library/mysql.php +++ b/library/mysql.php @@ -549,7 +549,7 @@ class MySQL { // Cleaner tools 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]); @@ -558,7 +558,7 @@ class MySQL { 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]);