Why is my query skipping the first row of the table when it displays its results.
$sql = mysql_query("SELECT id FROM answers", $db);
$myrow = mysql_fetch_array($sql);
if ($myrow = mysql_fetch_array($sql))
{do{
$id = $myrow["id"];
echo "$id<br>";
}while ($myrow = mysql_fetch_array($sql)); }
else {echo "Error getting id<br>";}
The results show as follows
2
3
4
5
6
7
There should be a 1 in there
If I change the 1 to a 8 in the table is displays 3 - 8 again skipping the first row
Any deas?