diff --git a/ChangeLog b/ChangeLog index 3c1ffc7ac..afdd2552f 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2002-05-17 Marc Delisle + * tbl_change.php3, bug 556296: field size for int + 2002-05-17 Loïc Chapeaux * db_details_structure.php3, lines 446-458; tbl_properties_options.php3, lines 119-143: beautified generated code. diff --git a/tbl_change.php3 b/tbl_change.php3 index 749f21a74..73dc6e8a4 100755 --- a/tbl_change.php3 +++ b/tbl_change.php3 @@ -1,7 +1,6 @@ 40) ? 40 : $len); - $maxlength = $len; - } + +// for char or varchar, respect the maximum length (M); +// for other types (int or float), the length is not a limit on the values +// that can be entered, so let's be generous (20) +// (we could also use the real limits for each numeric type) + if ($is_char) { + $fieldsize = (($len > 40) ? 40 : $len); + $maxlength = $len; + } + else { + $fieldsize = $maxlength = 20; + } // end if echo "\n"; ?>