From 3d4a54f263b0392a34fb9c71bbec56f0e475ec8b Mon Sep 17 00:00:00 2001 From: Amit Singh Date: Mon, 20 Mar 2023 13:24:41 +0530 Subject: [PATCH] added change_user function Added support for change_user --- simple-mysqli.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/simple-mysqli.php b/simple-mysqli.php index eae06be..78e21aa 100644 --- a/simple-mysqli.php +++ b/simple-mysqli.php @@ -501,4 +501,17 @@ public function close(): void { public function select_db($db_name): bool { return $this->mysqli->select_db($db_name); } + + /** + * Change user for the connection + * @param string $username + * @param string $password + * @param string $database + * @return bool + * @throws mysqli_sql_exception If mysqli function failed due to mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT) + */ + + public function change_user($username,$password,$database): bool { + return $this->mysqli->change_user($username,$password,$database); + } }