Skip to content

Commit

Permalink
Merge pull request #271 from ex-hentai/patch-2
Browse files Browse the repository at this point in the history
fix database charset
  • Loading branch information
xiaomlove authored Sep 1, 2024
2 parents 07cd6fd + 75df66e commit 4d86538
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nexus/Database/DBMysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public function connect($host, $username, $password, $database, $port)
if (mysqli_connect_errno()) {
throw new DatabaseException(mysqli_connect_error());
}
$mysqli->query("SET NAMES UTF8");
$mysqli->query("SET collation_connection = 'utf8_general_ci'");
$mysqli->set_charset("utf8mb4");
$mysqli->query("SET collation_connection = 'utf8mb4_unicode_ci'");
$mysqli->query("SET sql_mode=''");
$mysqli->query("SET time_zone='".date('P')."'");

Expand Down

0 comments on commit 4d86538

Please sign in to comment.