From efb17b539f645e4539ee95538acd8cfaf01080ed Mon Sep 17 00:00:00 2001 From: Awais-cb Date: Wed, 6 Dec 2017 11:41:30 +0500 Subject: [PATCH] Modified:minor syntax changes 1 --- upload/api/api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/upload/api/api.php b/upload/api/api.php index 720b1ae7..4099074f 100644 --- a/upload/api/api.php +++ b/upload/api/api.php @@ -23,7 +23,7 @@ class API extends REST { $this->db = mysqli_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD); if($this->db) - mysqli_select_db(self::DB,$this->db); + mysqli_select_db($this->db,self::DB); } //Public method for access api. @@ -72,7 +72,7 @@ class API extends REST mysqli_query($this->db,"DELETE FROM users WHERE user_id = $id"); - if (mysqli_affected_rows() > 0) + if (mysqli_affected_rows($this->db) > 0) $success = array('status' => "Success", "msg" => "Successfully one record deleted."); else $success = array('status' => "Failure", "msg" => "No such id exist in database");