1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-17 20:01:25 +02:00

Drop if exists

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@551 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-01-28 11:18:00 +00:00
parent 4099271496
commit 7805aaadac

View File

@@ -19,7 +19,7 @@ function dump_table($table, $style, $is_view = false) {
$result = $mysql->query("SHOW CREATE TABLE " . idf_escape($table));
if ($result) {
if ($style == "DROP, CREATE") {
echo "DROP " . ($is_view ? "VIEW" : "TABLE") . " " . idf_escape($table) . ";\n";
echo "DROP " . ($is_view ? "VIEW" : "TABLE") . " IF EXISTS " . idf_escape($table) . ";\n";
}
$create = $mysql->result($result, 1);
$result->free();