Fixed bug #667682 ("UNSIGNED" option in SET or ENUM).

This commit is contained in:
Michal Čihař
2003-01-21 13:57:40 +00:00
parent e485a865ff
commit cac9bb934e
7 changed files with 80 additions and 51 deletions

View File

@@ -186,19 +186,22 @@ while ($row = mysql_fetch_array($rowset)) {
$tmp[2] = substr(ereg_replace('([^,])\'\'', '\\1\\\'', ',' . $tmp[2]), 1);
$type = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
$type_nowrap = '';
} else {
$type_nowrap = ' nowrap="nowrap"';
}
$type = eregi_replace('BINARY', '', $type);
$type = eregi_replace('ZEROFILL', '', $type);
$type = eregi_replace('UNSIGNED', '', $type);
if (empty($type)) {
$type = ' ';
}
$binary = eregi('BINARY', $row['Type'], $test);
$unsigned = eregi('UNSIGNED', $row['Type'], $test);
$zerofill = eregi('ZEROFILL', $row['Type'], $test);
$binary = 0;
$unsigned = 0;
$zerofill = 0;
} else {
$binary = eregi('BINARY', $row['Type'], $test);
$unsigned = eregi('UNSIGNED', $row['Type'], $test);
$zerofill = eregi('ZEROFILL', $row['Type'], $test);
$type_nowrap = ' nowrap="nowrap"';
$type = eregi_replace('BINARY', '', $type);
$type = eregi_replace('ZEROFILL', '', $type);
$type = eregi_replace('UNSIGNED', '', $type);
if (empty($type)) {
$type = ' ';
}
}
$strAttribute = ' ';
if ($binary) {
$strAttribute = 'BINARY';