mirror of
https://github.com/vrana/adminer.git
synced 2025-08-12 01:24:17 +02:00
Link to EXPLAIN output
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
* @param Min_DB connection to examine indexes
|
* @param Min_DB connection to examine indexes
|
||||||
* @return null
|
* @return null
|
||||||
*/
|
*/
|
||||||
function select($result, $connection2 = null) {
|
function select($result, $connection2 = null, $href = "") {
|
||||||
$links = array(); // colno => orgtable - create links from these columns
|
$links = array(); // colno => orgtable - create links from these columns
|
||||||
$indexes = array(); // orgtable => array(column => colno) - primary keys
|
$indexes = array(); // orgtable => array(column => colno) - primary keys
|
||||||
$columns = array(); // orgtable => array(column => ) - not selected columns in primary key
|
$columns = array(); // orgtable => array(column => ) - not selected columns in primary key
|
||||||
@@ -41,7 +41,8 @@ function select($result, $connection2 = null) {
|
|||||||
$blobs[$j] = true;
|
$blobs[$j] = true;
|
||||||
}
|
}
|
||||||
$types[$j] = $field->type;
|
$types[$j] = $field->type;
|
||||||
echo "<th" . ($orgtable != "" || $field->name != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . h($field->name);
|
$name = h($field->name);
|
||||||
|
echo "<th" . ($orgtable != "" || $field->name != $orgname ? " title='" . h(($orgtable != "" ? "$orgtable." : "") . $orgname) . "'" : "") . ">" . ($href ? "<a href='$href" . strtolower($name) . "' target='_blank'>$name</a>" : $name);
|
||||||
}
|
}
|
||||||
echo "</thead>\n";
|
echo "</thead>\n";
|
||||||
}
|
}
|
||||||
|
@@ -106,7 +106,7 @@ if (!$error && $_POST) {
|
|||||||
$id = "explain-$commands";
|
$id = "explain-$commands";
|
||||||
echo ", <a href='#$id' onclick=\"return !toggle('$id');\">EXPLAIN</a>\n";
|
echo ", <a href='#$id' onclick=\"return !toggle('$id');\">EXPLAIN</a>\n";
|
||||||
echo "<div id='$id' class='hidden'>\n";
|
echo "<div id='$id' class='hidden'>\n";
|
||||||
select($explain);
|
select($explain, $connection2, ($jush == "sql" ? "http://dev.mysql.com/doc/refman/" . substr($connection->server_info, 0, 3) . "/en/explain-output.html#" : ""));
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user