Bug #424237
This commit is contained in:
@@ -5,6 +5,9 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2001-05-22 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* Bug #424237: cannot set an enum field to Null
|
||||||
|
|
||||||
2001-05-21 Marc Delisle <lem9@users.sourceforge.net>
|
2001-05-21 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
* add a message $strTextAreaLength to tell users when a textarea
|
* add a message $strTextAreaLength to tell users when a textarea
|
||||||
contents is too large to be editable ( > 32K)
|
contents is too large to be editable ( > 32K)
|
||||||
|
@@ -94,31 +94,56 @@ for($i=0;$i<mysql_num_rows($table_def);$i++)
|
|||||||
$set = ereg_replace("\\)$", "", $set);
|
$set = ereg_replace("\\)$", "", $set);
|
||||||
$set = explode(",", $set);
|
$set = explode(",", $set);
|
||||||
|
|
||||||
// show dropdown or radio depend on length
|
// show dropdown or radio depend on length
|
||||||
if (strlen($row_table_def["Type"]) > 20) {
|
if (strlen($row_table_def["Type"]) > 20) {
|
||||||
echo "<td><select name=fields[$field]>\n";
|
echo "<td><select name=fields[$field]>\n";
|
||||||
echo "<option value=\"\">\n";
|
echo "<option value=\"\">\n";
|
||||||
for($j=0; $j<count($set);$j++)
|
for($j=0; $j<count($set);$j++)
|
||||||
{
|
{
|
||||||
echo '<option value="'.substr($set[$j], 1, -1).'"';
|
echo '<option value="'.substr($set[$j], 1, -1).'"';
|
||||||
if($data == substr($set[$j], 1, -1) || ($data == "" && substr($set[$j], 1, -1) == $row_table_def["Default"]))
|
if ($data == substr($set[$j], 1, -1)
|
||||||
echo " selected";
|
|| ( $data == ""
|
||||||
echo ">".htmlspecialchars(substr($set[$j], 1, -1))."\n";
|
&& substr($set[$j], 1, -1) == $row_table_def["Default"]))
|
||||||
}
|
echo " selected";
|
||||||
echo "</select></td>";
|
|
||||||
}
|
echo ">".htmlspecialchars(substr($set[$j], 1, -1))."\n";
|
||||||
else {
|
}
|
||||||
echo "<td>\n";
|
echo "</select></td>";
|
||||||
for($j=0; $j<count($set);$j++)
|
}
|
||||||
{
|
else {
|
||||||
echo "<input type=radio name=fields[$field] ";
|
echo "<td>\n";
|
||||||
echo 'value="'.substr($set[$j], 1, -1).'"';
|
|
||||||
if($data == substr($set[$j], 1, -1) || ($data == "" && substr($set[$j], 1, -1) == $row_table_def["Default"]))
|
$seenchecked = 0;
|
||||||
echo " checked";
|
for($j=0; $j<count($set);$j++)
|
||||||
echo ">".htmlspecialchars(substr($set[$j], 1, -1))."\n";
|
{
|
||||||
}
|
echo "<input type=radio name=fields[$field] ";
|
||||||
echo "</td>";
|
echo 'value="'.substr($set[$j], 1, -1).'"';
|
||||||
}
|
if ($data == substr($set[$j], 1, -1)
|
||||||
|
|| ( $data == ""
|
||||||
|
&& substr($set[$j], 1, -1) == $row_table_def["Default"]
|
||||||
|
&& $row_table_def["Null"] != "YES"))
|
||||||
|
|
||||||
|
// To be able to display a checkmark in the [Null] box when the field
|
||||||
|
// is null, we lose the ability to display a checkmark besides the default value
|
||||||
|
{
|
||||||
|
echo " checked";
|
||||||
|
$seenchecked=1;
|
||||||
|
}
|
||||||
|
echo ">".htmlspecialchars(substr($set[$j], 1, -1))."\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($row_table_def["Null"] == "YES") {
|
||||||
|
echo "<input type=\"radio\"
|
||||||
|
name=fields[$field]
|
||||||
|
value=\"null\"";
|
||||||
|
|
||||||
|
if ($seenchecked==0)
|
||||||
|
echo " checked";
|
||||||
|
|
||||||
|
echo ">[$strNull]";
|
||||||
|
}
|
||||||
|
echo "</td>";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
elseif(strstr($row_table_def["Type"], "set"))
|
elseif(strstr($row_table_def["Type"], "set"))
|
||||||
|
Reference in New Issue
Block a user