mirror of
https://github.com/vrana/adminer.git
synced 2025-08-08 07:36:44 +02:00
Fix style
This commit is contained in:
@@ -12,7 +12,7 @@ if (isset($_GET["clickhouse"])) {
|
||||
@ini_set('track_errors', 1); // @ - may be disabled
|
||||
$file = @file_get_contents("$this->_url/?database=$db", false, stream_context_create(array('http' => array(
|
||||
'method' => 'POST',
|
||||
'content' => $this->is_query_select_like($query) ? ($query.' FORMAT JSONCompact') : $query,
|
||||
'content' => $this->isQuerySelectLike($query) ? "$query FORMAT JSONCompact" : $query,
|
||||
'header' => 'Content-type: application/x-www-form-urlencoded',
|
||||
'ignore_errors' => 1, // available since PHP 5.2.10
|
||||
))));
|
||||
@@ -43,7 +43,7 @@ if (isset($_GET["clickhouse"])) {
|
||||
return new Min_Result($return);
|
||||
}
|
||||
|
||||
function is_query_select_like($query) {
|
||||
function isQuerySelectLike($query) {
|
||||
return (bool) preg_match('~^(select|show)~i', $query);
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ if (isset($_GET["clickhouse"])) {
|
||||
|
||||
class Min_Driver extends Min_SQL {
|
||||
function delete($table, $queryWhere, $limit = 0) {
|
||||
return queries("ALTER TABLE " . table($table) . "DELETE $queryWhere");
|
||||
return queries("ALTER TABLE " . table($table) . " DELETE $queryWhere");
|
||||
}
|
||||
|
||||
function update($table, $set, $queryWhere, $limit = 0, $separator = "\n") {
|
||||
@@ -131,8 +131,8 @@ if (isset($_GET["clickhouse"])) {
|
||||
foreach ($set as $key => $val) {
|
||||
$values[] = "$key = $val";
|
||||
}
|
||||
$query = "$separator" . implode(",$separator", $values);
|
||||
return queries("ALTER TABLE ".table($table)." UPDATE $query$queryWhere");
|
||||
$query = $separator . implode(",$separator", $values);
|
||||
return queries("ALTER TABLE " . table($table) . " UPDATE $query$queryWhere");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user