我正在使用相同的过程来创建和填充表格 - 一切正常,除了在每个表格中跳过第一行。可以用另一双眼睛,因为我似乎无法确定问题所在。提前致谢。
$query = "SELECT * FROM members";
$results = mysql_query($query);
$row = mysql_fetch_array($results);
//echo my <table> start and headings;
while ($row = mysql_fetch_array($results))
{
echo "<tr><td>".$row['Last Name']."</td>";
echo "<td>".$row['First Name']."</td>";
echo "<td>".$row['Middle Name']."</td>";
echo "<td>".$row['Sfx']."</td>";
echo "<td>".$row['Prf']."</td>";
echo "<td>".$row['Spouse/SO']."</td>";
echo "<td>".$row['Ancestor']."</td>";
echo "<td>".$row['Status']."</td>";
echo "<td>".$row['Address 1']."</td>";
echo "<td>".$row['Address 2']."</td>";
echo "<td>".$row['City']."</td>";
echo "<td>".$row['ST']."</td>";
echo "<td>".$row['Zip 5']."</td>";
echo "<td>".$row['Zip 4']."</td>";
echo "<td>".$row['Home Phone']."</td>";
echo '<td><a href="mywebsite/mypage.php?id=' . $row['id'] . '">Bio</a></td></tr>';
}
echo "</table><hr>";