1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-16 11:34:10 +02:00

Use utf8mb4 on more places

This commit is contained in:
Jakub Vrana
2014-06-26 13:22:35 +02:00
parent b87d43fdcd
commit 8bd3dca2f7
4 changed files with 15 additions and 8 deletions

View File

@@ -292,9 +292,7 @@ if (!defined("DRIVER")) {
$connection = new Min_DB;
$credentials = $adminer->credentials();
if ($connection->connect($credentials[0], $credentials[1], $credentials[2])) {
$connection->set_charset( // available in MySQLi since PHP 5.0.5
version_compare($connection->server_info, "5.5.3") > 0 ? "utf8mb4" : "utf8" // SHOW CHARSET would require an extra query
);
$connection->set_charset(charset($connection)); // available in MySQLi since PHP 5.0.5
$connection->query("SET sql_quote_show_create = 1, autocommit = 1");
return $connection;
}