mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 10:04:07 +02:00
ClickHouse: Fix escaping
This commit is contained in:
@@ -63,7 +63,7 @@ if (isset($_GET["clickhouse"])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function quote($string) {
|
function quote($string) {
|
||||||
return "'$string'";
|
return "'" . addcslashes($string, "\\'") . "'";
|
||||||
}
|
}
|
||||||
|
|
||||||
function multi_query($query) {
|
function multi_query($query) {
|
||||||
@@ -242,7 +242,7 @@ if (isset($_GET["clickhouse"])) {
|
|||||||
function table_status($name = "", $fast = false) {
|
function table_status($name = "", $fast = false) {
|
||||||
global $connection;
|
global $connection;
|
||||||
$return = array();
|
$return = array();
|
||||||
$tables = get_rows("SELECT name, engine FROM system.tables WHERE database = '{$connection->_db}'");
|
$tables = get_rows("SELECT name, engine FROM system.tables WHERE database = " . q($connection->_db));
|
||||||
foreach ($tables as $table) {
|
foreach ($tables as $table) {
|
||||||
$return[$table['name']] = array(
|
$return[$table['name']] = array(
|
||||||
'Name' => $table['name'],
|
'Name' => $table['name'],
|
||||||
|
Reference in New Issue
Block a user