1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 17:14:07 +02:00

Link to EXPLAIN output

This commit is contained in:
Jakub Vrana
2010-12-10 17:54:57 +01:00
parent 3fad0c6ef7
commit 5a2c0646d4
2 changed files with 4 additions and 3 deletions

View File

@@ -4,7 +4,7 @@
* @param Min_DB connection to examine indexes
* @return null
*/
function select($result, $connection2 = null) {
function select($result, $connection2 = null, $href = "") {
$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
@@ -41,7 +41,8 @@ function select($result, $connection2 = null) {
$blobs[$j] = true;
}
$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";
}