From a657d31e1d662e377f0b6b679164a78045eb2964 Mon Sep 17 00:00:00 2001 From: ghost Date: Fri, 16 Jun 2023 16:32:46 +0300 Subject: [PATCH] fix enum data type --- library/mysql.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/library/mysql.php b/library/mysql.php index 959cba9..c46674d 100644 --- a/library/mysql.php +++ b/library/mysql.php @@ -491,13 +491,13 @@ class MySQL { $query = $this->_db->prepare('SELECT * FROM `host` - WHERE (`timeUpdated` IS NULL OR `timeUpdated` < ? ) AND `host`.`status` <> 0 + WHERE (`timeUpdated` IS NULL OR `timeUpdated` < ? ) AND `host`.`status` <> ? ORDER BY `hostId` LIMIT ' . (int) $limit); - $query->execute([$timeFrom]); + $query->execute([$timeFrom, 0]); return $query->fetchAll(); } @@ -605,14 +605,14 @@ class MySQL { FROM `hostPage` JOIN `host` ON (`host`.`hostId` = `hostPage`.`hostId`) - WHERE (`hostPage`.`timeUpdated` IS NULL OR `hostPage`.`timeUpdated` < ? ) AND `host`.`status` <> 0 + WHERE (`hostPage`.`timeUpdated` IS NULL OR `hostPage`.`timeUpdated` < ? ) AND `host`.`status` <> ? AND `hostPage`.`timeBanned` IS NULL ORDER BY LENGTH(`hostPage`.`uri`) ASC, RAND() LIMIT ' . (int) $limit); - $query->execute([$timeFrom]); + $query->execute([$timeFrom, 0]); return $query->fetchAll(); } @@ -630,13 +630,13 @@ class MySQL { $query = $this->_db->prepare('SELECT * FROM `manifest` - WHERE (`timeUpdated` IS NULL OR `timeUpdated` < ? ) AND `status` <> 0 + WHERE (`timeUpdated` IS NULL OR `timeUpdated` < ? ) AND `status` <> ? ORDER BY RAND() LIMIT ' . (int) $limit); - $query->execute([$timeFrom]); + $query->execute([$timeFrom, 0]); return $query->fetchAll(); }