projects
/
scuttle
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Supporting PHP7.0 on "mysqli" DB driver.
[scuttle]
/
includes
/
db
/
mysqli.php
diff --git
a/includes/db/mysqli.php
b/includes/db/mysqli.php
index fa643c241899854a3e13001eb2a71dbb7d83468c..267229f5b3b03dbcbb87889d2f2cd3a8bdf5548f 100644
(file)
--- a/
includes/db/mysqli.php
+++ b/
includes/db/mysqli.php
@@
-46,6
+46,8
@@
class sql_db
{
if (@mysqli_select_db($this->db_connect_id, $this->dbname))
{
{
if (@mysqli_select_db($this->db_connect_id, $this->dbname))
{
+ //Set utf-8
+ mysqli_query($this->db_connect_id, 'SET CHARACTER SET utf8');
return $this->db_connect_id;
}
}
return $this->db_connect_id;
}
}
@@
-380,10
+382,10
@@
class sql_db
}
function sql_escape($msg) {
}
function sql_escape($msg) {
- if (function_exists('mysql_real_escape_string')) {
- return @mysql
_real_escape_string($msg, $this->db_connect_id
);
+ if (function_exists('mysql
i
_real_escape_string')) {
+ return @mysql
i_real_escape_string($this->db_connect_id, $msg
);
} else {
} else {
- return mysql
_escape_string(
$msg);
+ return mysql
i_escape_string($this->db_connect_id,
$msg);
}
}
}
}
@@
-400,7
+402,7
@@
class sql_db
{
$this->sql_transaction('rollback');
}
{
$this->sql_transaction('rollback');
}
-
+
trigger_error($message, E_USER_ERROR);
}
trigger_error($message, E_USER_ERROR);
}
Benjamin Mako Hill
||
Want to submit a patch?