field size should always be at least 4 to allow the use of the 'null' value

This commit is contained in:
Loïc Chapeaux
2001-09-04 21:32:50 +00:00
parent f68a0c7399
commit f412e93aec

View File

@@ -321,8 +321,12 @@ for ($i = 0; $i < $fields_cnt; $i++) {
} // end if...else
} // end else if
else {
$fieldsize = (($len > 40) ? 40 : $len);
$maxlength = (($len < 4) ? 4 : $len);
if ($len < 4) {
$fieldsize = $maxlength = 4;
} else {
$fieldsize = $len;
$maxlength = (($len > 40) ? 40 : $len);
}
echo "\n";
?>
<td>