bug 995098, cannot copy table data

This commit is contained in:
Marc Delisle
2004-08-01 17:20:10 +00:00
parent b1fe7b3a21
commit 6001be9224
2 changed files with 3 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ $Source$
2004-08-01 Marc Delisle <lem9@users.sourceforge.net>
* tbl_change.php, libraries/relation.lib.php: bug 1001159, Commands
out of sync on Insert
* tbl_move_copy.php: bug 995098, cannot copy table data only
2004-07-31 Alexander M. Turek <me@derrabus.de>
* tbl_change.php, tbl_replace.php, libraries/relation.lib.php: Small

View File

@@ -119,7 +119,6 @@ $err_url = 'tbl_properties.php?' . PMA_generate_common_url($db, $table);
*/
PMA_DBI_select_db($db);
/**
* A target table name has been sent to this script -> do the work
*/
@@ -164,7 +163,6 @@ if (isset($new_name) && trim($new_name) != '') {
/* Generate query back */
$sql_structure = PMA_SQP_formatHtml($parsed_sql, 'query_only');
// If table exists, and 'add drop table' is selected: Drop it!
$drop_query = '';
if (isset($drop_if_exists) && $drop_if_exists == 'true') {
@@ -213,7 +211,8 @@ if (isset($new_name) && trim($new_name) != '') {
}
// Copy the data
if ($result != FALSE && ($what == 'data' || $what == 'dataonly')) {
//if ($result != FALSE && ($what == 'data' || $what == 'dataonly')) {
if ($what == 'data' || $what == 'dataonly') {
$sql_insert_data = 'INSERT INTO ' . $target . ' SELECT * FROM ' . $source;
PMA_DBI_query($sql_insert_data);
$sql_query .= "\n\n" . $sql_insert_data . ';';