]> git.joonet.de Git - adminer.git/commitdiff
Drop if exists
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 28 Jan 2009 11:18:00 +0000 (11:18 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Wed, 28 Jan 2009 11:18:00 +0000 (11:18 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@551 7c3ca157-0c34-0410-bff1-cbf682f78f5c

export.inc.php

index 95f61ba8358dff1b0c908983905f526df99089ad..54877caf45ed41c22cecca423a2804cd95d9b28a 100644 (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();