我试图在我的family_spouse
表中显示所有原始内容
代码
<?php
$query = "SELECT FROM family_spouse";
$result = mysql_query ($query);
echo "<table border='1'>
<tr>
<th>Family Type</th>
<th>Name</th>
<th>Gender</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['spouse_type'] . "</td>";
echo "<td>" . $row['spouse_name'] . "</td>";
echo "<td>" . $row['spouse_gender'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>
当我运行代码时,出现此错误Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in C:\wamp\www\eprofile\dashboard.php on line 598
第 598 行
while($row = mysql_fetch_array($result))