Events may be broken (bug #2898988)

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1264 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana 2009-12-11 15:42:16 +00:00
parent 4510179aeb
commit d545dadeab

View file

@ -42,9 +42,11 @@ SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
}
if ($_POST["events"]) {
$result = $connection->query("SHOW EVENTS");
while ($row = $result->fetch_assoc()) {
$out .= ($style != 'DROP+CREATE' ? "DROP EVENT IF EXISTS " . idf_escape($row["Name"]) . ";;\n" : "")
. $connection->result($connection->query("SHOW CREATE EVENT " . idf_escape($row["Name"])), 3) . ";;\n\n";
if ($result) {
while ($row = $result->fetch_assoc()) {
$out .= ($style != 'DROP+CREATE' ? "DROP EVENT IF EXISTS " . idf_escape($row["Name"]) . ";;\n" : "")
. $connection->result($connection->query("SHOW CREATE EVENT " . idf_escape($row["Name"])), 3) . ";;\n\n";
}
}
}
if ($out) {