From 4d98acb9f982c40b0e825b26d02fe0228fadabdc Mon Sep 17 00:00:00 2001 From: lopar Date: Sun, 30 Aug 2020 03:16:27 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BB=D0=B0=D1=81=D1=81-=D0=B7=D0=B0?= =?UTF-8?q?=D0=B3=D0=BB=D1=83=D1=88=D0=BA=D0=B0=20users=5Frow.php=20=D1=83?= =?UTF-8?q?=D0=B4=D0=B0=D0=BB=D1=91=D0=BD.=20=D0=A1=D0=BF=D0=B0=D1=81?= =?UTF-8?q?=D0=B8=D0=B1=D0=BE=20=D0=B7=D0=B0=20=D0=B4=D0=B2=D0=B0=20=D0=B3?= =?UTF-8?q?=D0=BE=D0=B4=D0=B0=20=D1=81=D0=BB=D1=83=D0=B6=D0=B1=D1=8B.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/users_row.php | 32 -------------------------------- dig.php | 2 +- 2 files changed, 1 insertion(+), 33 deletions(-) delete mode 100644 classes/users_row.php diff --git a/classes/users_row.php b/classes/users_row.php deleted file mode 100644 index 1905e90..0000000 --- a/classes/users_row.php +++ /dev/null @@ -1,32 +0,0 @@ - - * Project name: Battles-Game - */ - -class users_row -{ - private $row; - - - /** - * users_row constructor. - * @param $playerId - */ - public function __construct($playerId) - { - if (!$this->row) { - $this->row = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $playerId)->fetch_assoc(); - } - } - - - /** - * @return array - */ - public function result() - { - return $this->row; - } -} \ No newline at end of file diff --git a/dig.php b/dig.php index 51e2a5b..cffa3a6 100644 --- a/dig.php +++ b/dig.php @@ -3,7 +3,7 @@ session_start(); if (!($_SESSION['uid'] > 0)) header("Location: index.php"); require_once 'config.php'; -$user = (new users_row($_SESSION['uid']))->result(); +$user = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i', $playerId)->fetch_assoc(); $can_go_ch = 0; /*if($user['id']==1258)