mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 14:46:36 +02:00
Rename function with the same name as Driver::select
This commit is contained in:
@@ -49,7 +49,7 @@ if (!$error && $_POST) {
|
||||
do {
|
||||
$result = $connection->store_result();
|
||||
if (is_object($result)) {
|
||||
select($result, $connection2);
|
||||
print_select_result($result, $connection2);
|
||||
} else {
|
||||
echo "<p class='message'>" . lang('Routine has been called, %d row(s) affected.', $affected)
|
||||
. " <span class='time'>" . @date("H:i:s") . "</span>\n" // @ - time zone may be not set
|
||||
@@ -58,7 +58,7 @@ if (!$error && $_POST) {
|
||||
} while ($connection->next_result());
|
||||
|
||||
if ($out) {
|
||||
select($connection->query("SELECT " . implode(", ", $out)));
|
||||
print_select_result($connection->query("SELECT " . implode(", ", $out)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -315,7 +315,7 @@ if (!defined('Adminer\DRIVER')) {
|
||||
$result = $this->conn->query("SHOW WARNINGS");
|
||||
if ($result && $result->num_rows) {
|
||||
ob_start();
|
||||
select($result); // select() usually needs to print a big table progressively
|
||||
print_select_result($result); // print_select_result() usually needs to print a big table progressively
|
||||
return ob_get_clean();
|
||||
}
|
||||
}
|
||||
|
@@ -10,7 +10,7 @@ namespace Adminer;
|
||||
* @param int|numeric-string $limit
|
||||
* @return string[] $orgtables
|
||||
*/
|
||||
function select($result, Db $connection2 = null, array $orgtables = array(), $limit = 0): array {
|
||||
function print_select_result($result, Db $connection2 = null, array $orgtables = array(), $limit = 0): array {
|
||||
$links = array(); // colno => orgtable - create links from these columns
|
||||
$indexes = array(); // orgtable => array(column => colno) - primary keys
|
||||
$columns = array(); // orgtable => array(column => ) - not selected columns in primary key
|
||||
|
@@ -156,7 +156,7 @@ if (!$error && $_POST) {
|
||||
$explain_id = "explain-$commands";
|
||||
if (is_object($result)) {
|
||||
$limit = $_POST["limit"];
|
||||
$orgtables = select($result, $connection2, array(), $limit);
|
||||
$orgtables = print_select_result($result, $connection2, array(), $limit);
|
||||
if (!$_POST["only_errors"]) {
|
||||
echo "<form action='' method='post'>\n";
|
||||
$num_rows = $result->num_rows;
|
||||
@@ -188,7 +188,7 @@ if (!$error && $_POST) {
|
||||
echo ($warnings ? "<div id='$warnings_id' class='hidden'>\n$warnings</div>\n" : "");
|
||||
if ($explain) {
|
||||
echo "<div id='$explain_id' class='hidden explain'>\n";
|
||||
select($explain, $connection2, $orgtables);
|
||||
print_select_result($explain, $connection2, $orgtables);
|
||||
echo "</div>\n";
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user