CreateDatabaseBeforeCopying

This commit is contained in:
Marc Delisle
2005-06-04 13:29:44 +00:00
parent c2e0d7035b
commit 51b4118923
117 changed files with 126 additions and 6 deletions

View File

@@ -25,9 +25,11 @@ if (isset($db) &&
if (!isset($newname) || empty($newname)) {
$message = $strDatabaseEmpty;
} else {
$local_query = 'CREATE DATABASE ' . PMA_backquote($newname) . ';';
$sql_query = $local_query;
PMA_DBI_query($local_query);
if ($create_database_before_copying) {
$local_query = 'CREATE DATABASE ' . PMA_backquote($newname) . ';';
$sql_query = $local_query;
PMA_DBI_query($local_query);
}
$tables = PMA_DBI_get_tables($db);
foreach ($tables as $table) {
$back = $sql_query;
@@ -196,6 +198,7 @@ if ($cfgRelation['commwork']) {
<input type="radio" name="what" value="data" id="radio_copy_data" checked="checked" style="vertical-align: middle" /><label for="radio_copy_data"><?php echo $strStrucData; ?></label>&nbsp;&nbsp;<br />
<input type="radio" name="what" value="dataonly" id="radio_copy_dataonly" style="vertical-align: middle" /><label for="radio_copy_dataonly"><?php echo $strDataOnly; ?></label>&nbsp;&nbsp;<br />
<input type="checkbox" name="create_database_before_copying" value="1" id="checkbox_create_database_before_copying" style="vertical-align: middle" checked="checked" /><label for="checkbox_create_database_before_copying"><?php echo $strCreateDatabaseBeforeCopying; ?></label><br />
<input type="checkbox" name="auto_increment" value="1" id="checkbox_auto_increment" style="vertical-align: middle" /><label for="checkbox_auto_increment"><?php echo $strAddAutoIncrement; ?></label><br />
<input type="checkbox" name="constraints" value="1" id="checkbox_constraints" style="vertical-align: middle" /><label for="checkbox_constraints"><?php echo $strAddConstraints; ?></label><br />
<?php