我正在尝试从数据库中提取枚举值,但是,我只是得到一个空的选择菜单。我可以得到一些帮助吗
<?php
include('connectdb.php');
$tableName = 'firefighterinfo';
$columnName = 'status';
echo "<select name=\"$columnName\">";
$result = mysql_query("SELECT 'ENUM' FROM `fbmsdatabase`.`firefighterinfo` WHERE `status`='$columnName'") or die (mysql_error());
$row = mysql_fetch_array($result);
$enumList = explode(",", str_replace("'", "", substr($row['ENUM'], 5, (strlen($row['ENUM'])-6))));
foreach($enumList as $value)
echo '<option value="'.$value.'">'.$value.'</option>';
echo "</select>";
?>
<label for="Status">Status</label>
<?php require_once('php/enum_status.php'); ?>