aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorEvgeny Zinoviev <me@ch1p.io>2023-03-02 02:17:52 +0300
committerEvgeny Zinoviev <me@ch1p.io>2023-03-02 02:17:52 +0300
commit917d2622aa5fe748c1cda914eae94c12be743c42 (patch)
tree946d30723c32e0834eb7a74bfa7cb766d22bbd2a /engine
parent6daf574fd3f18909be05b0d61335e7634329ec45 (diff)
support tables and emojies in markdown
Diffstat (limited to 'engine')
-rw-r--r--engine/database/MySQLConnection.php5
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 {