Skip to content

Commit

Permalink
added change_user function
Browse files Browse the repository at this point in the history
Added support for change_user
  • Loading branch information
wpoet-dev committed Mar 20, 2023
1 parent 5f2db96 commit 3d4a54f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions simple-mysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 3d4a54f

Please sign in to comment.