diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2023-03-02 02:17:52 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2023-03-02 02:17:52 +0300 |
commit | 917d2622aa5fe748c1cda914eae94c12be743c42 (patch) | |
tree | 946d30723c32e0834eb7a74bfa7cb766d22bbd2a /engine/database | |
parent | 6daf574fd3f18909be05b0d61335e7634329ec45 (diff) |
support tables and emojies in markdown
Diffstat (limited to 'engine/database')
-rw-r--r-- | engine/database/MySQLConnection.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engine/database/MySQLConnection.php b/engine/database/MySQLConnection.php index 9b473cb..c4e47e5 100644 --- a/engine/database/MySQLConnection.php +++ b/engine/database/MySQLConnection.php @@ -17,7 +17,10 @@ class MySQLConnection extends CommonDatabase { public function connect(): bool { $this->link = new mysqli(); - return !!$this->link->real_connect($this->host, $this->user, $this->password, $this->database); + $result = $this->link->real_connect($this->host, $this->user, $this->password, $this->database); + if ($result) + $this->link->set_charset('utf8mb4'); + return !!$result; } public function query(string $sql, ...$args): mysqli_result|bool { |