mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-13 18:40:49 +01:00
remove versioning code for outdated mysql version
This commit is contained in:
parent
4551b47421
commit
a817a8c57b
@ -78,10 +78,8 @@ function sql_open() {
|
|||||||
if ($config['debug'])
|
if ($config['debug'])
|
||||||
$debug['time']['db_connect'] = '~' . round((microtime(true) - $start) * 1000, 2) . 'ms';
|
$debug['time']['db_connect'] = '~' . round((microtime(true) - $start) * 1000, 2) . 'ms';
|
||||||
|
|
||||||
if (mysql_version() >= 50503)
|
query('SET NAMES utf8mb4') or error(db_error());
|
||||||
query('SET NAMES utf8mb4') or error(db_error());
|
|
||||||
else
|
|
||||||
query('SET NAMES utf8') or error(db_error());
|
|
||||||
return $pdo;
|
return $pdo;
|
||||||
} catch(PDOException $e) {
|
} catch(PDOException $e) {
|
||||||
$message = $e->getMessage();
|
$message = $e->getMessage();
|
||||||
|
Loading…
Reference in New Issue
Block a user