RFE #949594 - Allow changing amount of columns for adding fields/

creating table (without losing previous data)
This commit is contained in:
Garvin Hicking
2004-05-07 08:41:08 +00:00
parent 63a2921479
commit d9491aea0b
4 changed files with 21 additions and 3 deletions

View File

@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-05-07 Garvin Hicking <pma@supergarv.de>
* tbl_create.php, tbl_addfield.php, tbl_properties.inc.php:
RFE #949594 - Allow changing amount of columns for adding fields/
creating table (without losing previous data)
2004-05-07 Alexander M. Turek <me@derrabus.de>
* README: Updated copyright as discussed a couple of days ago.

View File

@@ -24,7 +24,12 @@ $err_url = 'tbl_properties.php?' . PMA_generate_common_url($db, $table);
* The form used to define the field to add has been submitted
*/
$abort = false;
if (isset($submit)) {
if (isset($submit_num_fields)) {
if (isset($orig_after_field)) {
$after_field = $orig_after_field;
}
$regenerate = TRUE;
} else if (isset($submit)) {
$query = '';
// Transforms the radio button field_key into 3 arrays

View File

@@ -32,7 +32,9 @@ PMA_DBI_select_db($db);
* The form used to define the structure of the table has been submitted
*/
$abort = FALSE;
if (isset($submit)) {
if (isset($submit_num_fields)) {
$regenerate = TRUE;
} else if (isset($submit)) {
$sql_query = $query_cpy = '';
// Transforms the radio button field_key into 3 arrays

View File

@@ -145,7 +145,7 @@ for ($i = 0 ; $i < $num_fields; $i++) {
$row['Field'] = (isset($field_name) && isset($field_name[$i]) ? $field_name[$i] : FALSE);
$row['Type'] = (isset($field_type) && isset($field_type[$i]) ? $field_type[$i] : FALSE);
$row['Null'] = (isset($field_null) && isset($field_null[$i]) ? $field_null[$i] : '');
if ($row['Null'] == '') {
if (isset($field_type[$i]) && $row['Null'] == '') {
$submit_null = TRUE;
}
@@ -606,6 +606,12 @@ echo "\n";
?>
<input type="submit" name="submit" value="<?php echo $strSave; ?>" />
<?php
if ($action == 'tbl_create.php' || $action == 'tbl_addfield.php')
echo ' &nbsp;&nbsp;<em>' . $strOr . '</em>&nbsp;&nbsp;' . $strFields . ':' . "\n";
echo ' ' . '<input type="text" name="num_fields" size="2" class="textfield" value="' . $num_fields . '" />' . "\n";
echo ' ' . '&nbsp;<input type="submit" name="submit_num_fields" value="' . $strGo . '" />' . "\n";
?>
</form>
<table>