current value of enums

This commit is contained in:
Marc Delisle
2001-08-03 12:22:16 +00:00
parent a2c3b25977
commit 83c2a7fbbb
2 changed files with 5 additions and 5 deletions

View File

@@ -6,6 +6,9 @@ $Id$
$Source$
2001-08-03 Marc Delisle <lem9@users.sourceforge.net>
* tbl_change.php3: current value of enums was lost
2001-08-02 Steve Alberty <alberty@neptunlabs.de>
* tbl_properties.php3, db_details.php3: fixed problem with table
size display and MERGE tables

View File

@@ -81,7 +81,6 @@ for ($i = 0; $i < mysql_num_rows($table_def); $i++) {
// The type column
$row_table_def['True_Type']=ereg_replace('\\(.*','',$row_table_def['Type']);
//switch (ereg_replace('\\(.*', '', $row_table_def['Type'])) {
switch ($row_table_def['True_Type']) {
case 'set':
$type = 'set';
@@ -159,7 +158,6 @@ for ($i = 0; $i < mysql_num_rows($table_def); $i++) {
echo "\n";
// The value column (depends on type)
//if (strstr($row_table_def['Type'], 'text')) {
if (strstr($row_table_def['True_Type'], 'text')) {
?>
<td>
@@ -171,7 +169,6 @@ for ($i = 0; $i < mysql_num_rows($table_def); $i++) {
echo ' <td>' . $strTextAreaLength . '</td>' . "\n";
}
}
//else if (strstr($row_table_def['Type'], 'enum')) {
else if (strstr($row_table_def['True_Type'], 'enum')) {
$set = str_replace('enum(', '', $row_table_def['Type']);
$set = ereg_replace('\\)$', '', $set);
@@ -193,9 +190,9 @@ for ($i = 0; $i < mysql_num_rows($table_def); $i++) {
|| ($data == ''
&& isset($row_table_def['Default'])
&& $set[$j] == $row_table_def['Default'])) {
echo ' "selected"';
echo ' selected';
}
echo '>' . htmlspecialchars($set[$j]) . '</option>' . "\n";
echo '>' .htmlspecialchars($set[$j]) . '</option>' . "\n";
} // end for
?>
</select>