mirror of
https://github.com/vrana/adminer.git
synced 2025-08-09 16:17:48 +02:00
Use $connection->result
This commit is contained in:
@@ -1066,14 +1066,15 @@ if (!defined("DRIVER")) {
|
|||||||
return get_key_vals("SHOW VARIABLES");
|
return get_key_vals("SHOW VARIABLES");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Checks if C-style escapes are supported
|
/** Check if C-style escapes are supported
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
function is_c_style_escapes() {
|
function is_c_style_escapes() {
|
||||||
static $c_style = null;
|
global $connection;
|
||||||
|
static $c_style;
|
||||||
if ($c_style === null) {
|
if ($c_style === null) {
|
||||||
$variables = get_key_vals("SHOW VARIABLES LIKE 'sql_mode'");
|
$sql_mode = $connection->result("SHOW VARIABLES LIKE 'sql_mode'", 1);
|
||||||
$c_style = strpos($variables["sql_mode"], 'NO_BACKSLASH_ESCAPES') === false;
|
$c_style = (strpos($sql_mode, 'NO_BACKSLASH_ESCAPES') === false);
|
||||||
}
|
}
|
||||||
return $c_style;
|
return $c_style;
|
||||||
}
|
}
|
||||||
|
@@ -888,10 +888,10 @@ AND typelem = 0"
|
|||||||
}
|
}
|
||||||
|
|
||||||
function is_c_style_escapes() {
|
function is_c_style_escapes() {
|
||||||
static $c_style = null;
|
global $connection;
|
||||||
|
static $c_style;
|
||||||
if ($c_style === null) {
|
if ($c_style === null) {
|
||||||
$vals = get_vals("SHOW standard_conforming_strings");
|
$c_style = ($connection->result("SHOW standard_conforming_strings") == "off");
|
||||||
$c_style = $vals[0] == "off";
|
|
||||||
}
|
}
|
||||||
return $c_style;
|
return $c_style;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user