--- tbl_alter.php3.orig Fri Aug 10 18:44:28 2001 +++ tbl_alter.php3 Fri Aug 10 18:48:28 2001 @@ -28,9 +28,27 @@ $query = ''; } $query .= ' ' . backquote($field_orig[0]) . ' ' . backquote($field_name[0]) . ' ' . $field_type[0] . ' '; - if ($field_length[0] != '') { - $query .= '(' . $field_length[0] . ') '; - } + // Some field types shouldn't have lengths + switch (strtoupper($field_type[0])) + { + case 'DATE': + case 'DATETIME': + case 'TIME': + case 'TINYBLOB': + case 'TINYTEXT': + case 'BLOB': + case 'TEXT': + case 'MEDIUMBLOB': + case 'MEDIUMTEXT': + case 'LONGBLOB': + case 'LONGTEXT': + break; + + default: + if ($field_length[0] != '') { + $query .= '(' . $field_length[0] . ') '; + }; + }; if ($field_attribute[0] != '') { $query .= $field_attribute[0] . ' '; } --- tbl_properties.inc.php3.orig Fri Aug 10 22:17:02 2001 +++ tbl_properties.inc.php3 Fri Aug 10 22:22:31 2001 @@ -99,7 +99,32 @@ - +N/A"; + break; + + default: + $fieldlengthtype="text"; + $fieldlengthalt=""; + }; +?> + +