Show only SELECT result in 'Only errors' mode
This commit is contained in:
parent
3535d0a325
commit
6d0b86bffa
|
@ -110,30 +110,28 @@ if (!$error && $_POST) {
|
||||||
echo "<p class='message' title='" . h($connection->info) . "'>" . lang('Query executed OK, %d row(s) affected.', $connection->affected_rows) . "$time\n";
|
echo "<p class='message' title='" . h($connection->info) . "'>" . lang('Query executed OK, %d row(s) affected.', $connection->affected_rows) . "$time\n";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ($_POST["only_errors"]) {
|
|
||||||
echo $print;
|
|
||||||
$print = "";
|
|
||||||
}
|
|
||||||
select($result, $connection2);
|
select($result, $connection2);
|
||||||
echo "<form action='' method='post'>\n";
|
if (!$_POST["only_errors"]) {
|
||||||
echo "<p>" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) : "") . $time;
|
echo "<form action='' method='post'>\n";
|
||||||
$id = "export-$commands";
|
echo "<p>" . ($result->num_rows ? lang('%d row(s)', $result->num_rows) : "") . $time;
|
||||||
$export = ", <a href='#$id' onclick=\"return !toggle('$id');\">" . lang('Export') . "</a><span id='$id' class='hidden'>: "
|
$id = "export-$commands";
|
||||||
. html_select("output", $adminer->dumpOutput(), $adminer_export["output"]) . " "
|
$export = ", <a href='#$id' onclick=\"return !toggle('$id');\">" . lang('Export') . "</a><span id='$id' class='hidden'>: "
|
||||||
. html_select("format", $dump_format, $adminer_export["format"])
|
. html_select("output", $adminer->dumpOutput(), $adminer_export["output"]) . " "
|
||||||
. "<input type='hidden' name='query' value='" . h($q) . "'>"
|
. html_select("format", $dump_format, $adminer_export["format"])
|
||||||
. " <input type='submit' name='export' value='" . lang('Export') . "' onclick='eventStop(event);'><input type='hidden' name='token' value='$token'></span>"
|
. "<input type='hidden' name='query' value='" . h($q) . "'>"
|
||||||
;
|
. " <input type='submit' name='export' value='" . lang('Export') . "' onclick='eventStop(event);'><input type='hidden' name='token' value='$token'></span>"
|
||||||
if ($connection2 && preg_match("~^($space|\\()*SELECT\\b~isU", $q) && ($explain = explain($connection2, $q))) {
|
;
|
||||||
$id = "explain-$commands";
|
if ($connection2 && preg_match("~^($space|\\()*SELECT\\b~isU", $q) && ($explain = explain($connection2, $q))) {
|
||||||
echo ", <a href='#$id' onclick=\"return !toggle('$id');\">EXPLAIN</a>$export\n";
|
$id = "explain-$commands";
|
||||||
echo "<div id='$id' class='hidden'>\n";
|
echo ", <a href='#$id' onclick=\"return !toggle('$id');\">EXPLAIN</a>$export\n";
|
||||||
select($explain, $connection2, ($jush == "sql" ? "http://dev.mysql.com/doc/refman/" . substr($connection->server_info, 0, 3) . "/en/explain-output.html#" : ""));
|
echo "<div id='$id' class='hidden'>\n";
|
||||||
echo "</div>\n";
|
select($explain, $connection2, ($jush == "sql" ? "http://dev.mysql.com/doc/refman/" . substr($connection->server_info, 0, 3) . "/en/explain-output.html#" : ""));
|
||||||
} else {
|
echo "</div>\n";
|
||||||
echo "$export\n";
|
} else {
|
||||||
|
echo "$export\n";
|
||||||
|
}
|
||||||
|
echo "</form>\n";
|
||||||
}
|
}
|
||||||
echo "</form>\n";
|
|
||||||
}
|
}
|
||||||
$start = $end;
|
$start = $end;
|
||||||
} while ($connection->next_result());
|
} while ($connection->next_result());
|
||||||
|
|
Loading…
Reference in a new issue