$sql = "SELECT * FROM table";
$result = mysql_query($sql);
while($row = mysql_fetch_row($result)){
// PRINT COLUMN NAMES WITH EMPTY VALUE
}
我该怎么办?
感谢
答案 0 :(得分:2)
$sql = "SELECT * FROM table";
$result = mysql_query($sql);
while($row = mysql_fetch_assoc($result))
{
foreach ($row as $columnName => $value)
{
if (empty($value))
{
echo $columnName;
}
}
}