Added mysqli support

This commit is contained in:
laf
2015-08-08 19:27:18 +00:00
parent 904a2099b5
commit 4b49c148b6
14 changed files with 1167 additions and 583 deletions
+7 -1
View File
@@ -319,7 +319,13 @@ function truncate($substring, $max = 50, $rep = '...') {
function mres($string) {
// short function wrapper because the real one is stupidly long and ugly. aesthetics.
return mysql_real_escape_string($string);
global $config, $database_link;
if ($config['db']['extension'] == 'mysqli') {
return mysqli_real_escape_string($database_link,$string);
}
else {
return mysql_real_escape_string($string);
}
}
function getifhost($id) {