fixed bug #489440 - enum fields in tbl_properties.php
This commit is contained in:
@@ -253,11 +253,11 @@ while ($row = mysql_fetch_array($fields_rs)) {
|
||||
|
||||
$type = $row['Type'];
|
||||
// reformat mysql query output - staybyte - 9. June 2001
|
||||
$shorttype = substr($type, 0, 3);
|
||||
if ($shorttype == 'set' || $shorttype == 'enu') {
|
||||
$type = eregi_replace(',', ', ', $type);
|
||||
// Removes automatic MySQL escape format
|
||||
$type = str_replace('\'\'', '\\\'', $type);
|
||||
// loic1: set or enum types: slashes single quotes inside options
|
||||
if (eregi('^(set|enum)\((.+)\)$', $type, $tmp)) {
|
||||
$tmp[2] = ereg_replace('([^,])\'([^,])', '\\1\\\'\\2', ',' . $tmp[2] . ',');
|
||||
$tmp[2] = substr($tmp[2], 1, -1);
|
||||
$type = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
|
||||
$type_nowrap = '';
|
||||
} else {
|
||||
$type_nowrap = ' nowrap="nowrap"';
|
||||
|
Reference in New Issue
Block a user