mirror of
https://github.com/vrana/adminer.git
synced 2025-08-13 01:54:00 +02:00
Respect error in EXPLAIN (bug #3118536)
This commit is contained in:
@@ -109,11 +109,11 @@ if (!$error && $_POST) {
|
|||||||
}
|
}
|
||||||
select($result, $connection2);
|
select($result, $connection2);
|
||||||
echo "<p>" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) : "") . $time;
|
echo "<p>" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) : "") . $time;
|
||||||
if ($connection2 && preg_match("~^($space|\\()*SELECT\\b~isU", $q)) {
|
if ($connection2 && preg_match("~^($space|\\()*SELECT\\b~isU", $q) && ($explain = explain($connection2, $q))) {
|
||||||
$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($connection2, $q));
|
select($explain);
|
||||||
echo "</div>\n";
|
echo "</div>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user