diff --git a/index.php b/index.php index 5810eabb..84cbb379 100644 --- a/index.php +++ b/index.php @@ -129,12 +129,9 @@ if (isset($_GET["download"])) { } } $message = lang('Tables have been truncated.'); - } else { - $result = queries((isset($_POST["optimize"]) ? "OPTIMIZE" : (isset($_POST["check"]) ? "CHECK" : (isset($_POST["repair"]) ? "REPAIR" : (isset($_POST["drop"]) ? "DROP" : "ANALYZE")))) . " TABLE " . implode(", ", array_map('idf_escape', $_POST["tables"]))); - if ($result) { - while ($row = $result->fetch_assoc()) { - $message .= htmlspecialchars("$row[Table]: $row[Msg_text]") . "
"; - } + } elseif ($result = queries((isset($_POST["optimize"]) ? "OPTIMIZE" : (isset($_POST["check"]) ? "CHECK" : (isset($_POST["repair"]) ? "REPAIR" : (isset($_POST["drop"]) ? "DROP" : "ANALYZE")))) . " TABLE " . implode(", ", array_map('idf_escape', $_POST["tables"])))) { + while ($row = $result->fetch_assoc()) { + $message .= htmlspecialchars("$row[Table]: $row[Msg_text]") . "
"; } } query_redirect(queries(), substr($SELF, 0, -1), $message, $result, false, !$result);