0
$sql = "SELECT * FROM table";
$result = mysql_query($sql);
while($row = mysql_fetch_row($result)){
// PRINT COLUMN NAMES WITH EMPTY VALUE
}
我該怎麼做?
謝謝PHP MySQL僅打印數據庫行中的空列名稱
$sql = "SELECT * FROM table";
$result = mysql_query($sql);
while($row = mysql_fetch_row($result)){
// PRINT COLUMN NAMES WITH EMPTY VALUE
}
我該怎麼做?
謝謝PHP MySQL僅打印數據庫行中的空列名稱
$sql = "SELECT * FROM table";
$result = mysql_query($sql);
while($row = mysql_fetch_assoc($result))
{
foreach ($row as $columnName => $value)
{
if (empty($value))
{
echo $columnName;
}
}
}