EXPLAIN for UNIONs
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1266 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
parent
75f9958434
commit
176161e88d
|
@ -225,4 +225,5 @@ $translations = array(
|
||||||
'%d e-mail(s) have been sent.' => '已發送 %d 封郵件。',
|
'%d e-mail(s) have been sent.' => '已發送 %d 封郵件。',
|
||||||
'Webserver file %s' => '網頁伺服器檔案 %s',
|
'Webserver file %s' => '網頁伺服器檔案 %s',
|
||||||
'File does not exist.' => '檔案不存在',
|
'File does not exist.' => '檔案不存在',
|
||||||
|
'Item has been deleted.' => '該項目已被刪除',
|
||||||
);
|
);
|
||||||
|
|
|
@ -74,12 +74,12 @@ if (!$error && $_POST) {
|
||||||
$result = $connection->store_result();
|
$result = $connection->store_result();
|
||||||
if (is_object($result)) {
|
if (is_object($result)) {
|
||||||
select($result, $connection2);
|
select($result, $connection2);
|
||||||
if ($connection2 && preg_match("~^$space*SELECT$space+~isU", $q)) {
|
if ($connection2 && preg_match("~^($space|\\()*SELECT\\b~isU", $q)) {
|
||||||
$id = "explain-$explain";
|
$id = "explain-$explain";
|
||||||
echo "<p>" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) . ", " : "");
|
echo "<p>" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) . ", " : "");
|
||||||
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($connection2->query("EXPLAIN $q"), $connection2);
|
select($connection2->query("EXPLAIN $q"));
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
$explain++;
|
$explain++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue