From 793cd4e4f3cd13ea064f28dc7fcffe5bff3ec11f Mon Sep 17 00:00:00 2001 From: lopar Date: Sat, 22 Jun 2019 18:49:17 +0300 Subject: [PATCH] remove deprecated --- zayavka.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zayavka.php b/zayavka.php index f8cac3d..ab985a0 100644 --- a/zayavka.php +++ b/zayavka.php @@ -1249,7 +1249,8 @@ if (!empty($_POST['open'])) { Показать только бои персонажа: за '; - $u = mysql_fetch_array(mysql_query("SELECT `id` FROM `users` WHERE `login` = '" . (($_REQUEST['filter']) ? "{$_REQUEST['filter']}" : "{$user['login']}") . "' LIMIT 1")); + + $u = db::c()->query('SELECT `id` FROM `users` WHERE `login` = "?s"', (($_REQUEST['filter']) ? "{$_REQUEST['filter']}" : "{$user['login']}"))->fetch_assoc(); $data = mysql_query("SELECT * FROM `battle` WHERE ((`t1` LIKE '%;{$u[0]};%' OR `t1` LIKE '{$u[0]}' OR `t1` LIKE '{$u[0]};%' OR `t1` LIKE '%;{$u[0]}') OR (`t2` LIKE '%;{$u[0]};%' OR `t2` LIKE '{$u[0]}' OR `t2` LIKE '{$u[0]};%' OR `t2` LIKE '%;{$u[0]}')) AND `date` LIKE '" . (($logs != 1) ? "20" . substr($logs, 6, 2) . "-" . substr($logs, 3, 2) . "-" . substr($logs, 0, 2) : "" . date("Y-m-d")) . " %' ORDER by `id` DESC"); while ($row = @mysql_fetch_array($data)) {