parent
2df2398b87
commit
1af6b8cf20
|
@ -86,8 +86,10 @@ function sql_connect($host, $user, $pass, $db) {
|
||||||
global $sql_connection;
|
global $sql_connection;
|
||||||
|
|
||||||
$sql_connection = new mysqli($host, $user, $pass, $db);
|
$sql_connection = new mysqli($host, $user, $pass, $db);
|
||||||
if ($sql_connection->connect_errno)
|
if ($sql_connection->connect_errno) {
|
||||||
|
error("Unable to connect to MySQL: " . $sql_connection->connect_error);
|
||||||
return sql_error("Unable to connect to MySQL: " . $sql_connection->connect_error);
|
return sql_error("Unable to connect to MySQL: " . $sql_connection->connect_error);
|
||||||
|
}
|
||||||
|
|
||||||
$result = $sql_connection->query("SET CHARACTER SET utf8;");
|
$result = $sql_connection->query("SET CHARACTER SET utf8;");
|
||||||
if (! $result)
|
if (! $result)
|
||||||
|
|
Loading…
Reference in New Issue