mirror of
https://github.com/vrana/adminer.git
synced 2025-08-16 19:44:00 +02:00
Use connection() instead of $connection
This commit is contained in:
@@ -26,7 +26,7 @@ if (!$error && $_POST) {
|
||||
$val = "''";
|
||||
}
|
||||
if (isset($out[$key])) {
|
||||
$connection->query("SET @" . idf_escape($field["field"]) . " = $val");
|
||||
connection()->query("SET @" . idf_escape($field["field"]) . " = $val");
|
||||
}
|
||||
}
|
||||
$call[] = (isset($out[$key]) ? "@" . idf_escape($field["field"]) : $val);
|
||||
@@ -34,8 +34,8 @@ if (!$error && $_POST) {
|
||||
|
||||
$query = (isset($_GET["callf"]) ? "SELECT" : "CALL") . " " . table($PROCEDURE) . "(" . implode(", ", $call) . ")";
|
||||
$start = microtime(true);
|
||||
$result = $connection->multi_query($query);
|
||||
$affected = $connection->affected_rows; // getting warnings overwrites this
|
||||
$result = connection()->multi_query($query);
|
||||
$affected = connection()->affected_rows; // getting warnings overwrites this
|
||||
echo adminer()->selectQuery($query, $start, !$result);
|
||||
|
||||
if (!$result) {
|
||||
@@ -47,7 +47,7 @@ if (!$error && $_POST) {
|
||||
}
|
||||
|
||||
do {
|
||||
$result = $connection->store_result();
|
||||
$result = connection()->store_result();
|
||||
if (is_object($result)) {
|
||||
print_select_result($result, $connection2);
|
||||
} else {
|
||||
@@ -55,10 +55,10 @@ if (!$error && $_POST) {
|
||||
. " <span class='time'>" . @date("H:i:s") . "</span>\n" // @ - time zone may be not set
|
||||
;
|
||||
}
|
||||
} while ($connection->next_result());
|
||||
} while (connection()->next_result());
|
||||
|
||||
if ($out) {
|
||||
print_select_result($connection->query("SELECT " . implode(", ", $out)));
|
||||
print_select_result(connection()->query("SELECT " . implode(", ", $out)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user