From fe9e85af7b0fafb726d004b345631c24cfdf2574 Mon Sep 17 00:00:00 2001 From: WizWiz <27927279+wizwizdev@users.noreply.github.com> Date: Thu, 2 May 2024 09:38:09 +0330 Subject: [PATCH] Update bot.php --- bot.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.php b/bot.php index 91bf187..558c87f 100644 --- a/bot.php +++ b/bot.php @@ -6413,12 +6413,12 @@ $marzbanList = array_column($info, 0); - if(count($marzbanList) > 0) $condition = " AND `id` " .($userInfo['step'] == "addNewMarzbanPlan"?"IN":"NOT IN") . " (" . (str_repeat('?,', count($marzbanList) - 1) . '?') . ")"; + if(count($marzbanList) > 0) $condition = " AND `id` " .($userInfo['step'] == "addNewMarzbanPlan"?"IN":"NOT IN") . " (" . implode(", ", $marzbanList) . ")"; else $condition = ""; + $stmt = $connection->prepare("SELECT * FROM `server_info` WHERE `active`=1 $condition"); - if(!empty($condition)) $stmt->execute($marzbanList); - else $stmt->execute(); + $stmt->execute(); $srvs = $stmt->get_result(); $stmt->close();