mirror of
https://github.com/Xkeeper0/jul.git
synced 2025-07-26 01:31:58 -07:00
Move to utf8mb4 and add php7 mysql compat shim
fixes #10, #35, #36 (hopefully)
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
<?php
|
||||
|
||||
if (!function_exists("mysql_connect")) {
|
||||
// probably php 7, load shim for it
|
||||
require_once("lib/mysql_compat.php");
|
||||
}
|
||||
|
||||
class mysql {
|
||||
// a 'backport' of my 'static' class in not-as-static form
|
||||
// the statistics remain static so they're global just in case this gets used for >1 connection
|
||||
@@ -22,7 +28,7 @@
|
||||
$this->connection = (($persist) ? mysql_pconnect($host,$user,$pass) : mysql_connect($host,$user,$pass));
|
||||
$t = microtime(true)-$start;
|
||||
$this->id = ++self::$connection_count;
|
||||
$this->set_character_encoding("utf8");
|
||||
$this->set_character_encoding("utf8mb4");
|
||||
|
||||
if (self::$debug_on) {
|
||||
$b = self::getbacktrace();
|
||||
|
Reference in New Issue
Block a user