RFE #949594 - Allow changing amount of columns for adding fields/
creating table (without losing previous data)
This commit is contained in:
@@ -5,6 +5,11 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$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>
|
2004-05-07 Alexander M. Turek <me@derrabus.de>
|
||||||
* README: Updated copyright as discussed a couple of days ago.
|
* README: Updated copyright as discussed a couple of days ago.
|
||||||
|
|
||||||
|
@@ -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
|
* The form used to define the field to add has been submitted
|
||||||
*/
|
*/
|
||||||
$abort = false;
|
$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 = '';
|
$query = '';
|
||||||
|
|
||||||
// Transforms the radio button field_key into 3 arrays
|
// Transforms the radio button field_key into 3 arrays
|
||||||
|
@@ -32,7 +32,9 @@ PMA_DBI_select_db($db);
|
|||||||
* The form used to define the structure of the table has been submitted
|
* The form used to define the structure of the table has been submitted
|
||||||
*/
|
*/
|
||||||
$abort = FALSE;
|
$abort = FALSE;
|
||||||
if (isset($submit)) {
|
if (isset($submit_num_fields)) {
|
||||||
|
$regenerate = TRUE;
|
||||||
|
} else if (isset($submit)) {
|
||||||
$sql_query = $query_cpy = '';
|
$sql_query = $query_cpy = '';
|
||||||
|
|
||||||
// Transforms the radio button field_key into 3 arrays
|
// Transforms the radio button field_key into 3 arrays
|
||||||
|
@@ -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['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['Type'] = (isset($field_type) && isset($field_type[$i]) ? $field_type[$i] : FALSE);
|
||||||
$row['Null'] = (isset($field_null) && isset($field_null[$i]) ? $field_null[$i] : '');
|
$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;
|
$submit_null = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -606,6 +606,12 @@ echo "\n";
|
|||||||
?>
|
?>
|
||||||
|
|
||||||
<input type="submit" name="submit" value="<?php echo $strSave; ?>" />
|
<input type="submit" name="submit" value="<?php echo $strSave; ?>" />
|
||||||
|
<?php
|
||||||
|
if ($action == 'tbl_create.php' || $action == 'tbl_addfield.php')
|
||||||
|
echo ' <em>' . $strOr . '</em> ' . $strFields . ':' . "\n";
|
||||||
|
echo ' ' . '<input type="text" name="num_fields" size="2" class="textfield" value="' . $num_fields . '" />' . "\n";
|
||||||
|
echo ' ' . ' <input type="submit" name="submit_num_fields" value="' . $strGo . '" />' . "\n";
|
||||||
|
?>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
|
Reference in New Issue
Block a user