skinme!
10-08-2002, 09:35 PM
Hi,
I'm doing a query on a table of mine but every time I run it, it misses out the first result.
I have isolated it to the following code:
while ($row=@mysql_fetch_array($query_result)) {
$table_body .="$row[0] $row[1] $row[2] $row[3] ";
}
I know I am receiving the first result because this returns the right number of results.
$results = @mysql_num_rows($query_result);
Thus my while loop must be missing out the first result. Can anybody help me here? Moreover, could somebody explain what the while loop does because this is standard code I copied from PHPmanual without *really* understanding.
I'm doing a query on a table of mine but every time I run it, it misses out the first result.
I have isolated it to the following code:
while ($row=@mysql_fetch_array($query_result)) {
$table_body .="$row[0] $row[1] $row[2] $row[3] ";
}
I know I am receiving the first result because this returns the right number of results.
$results = @mysql_num_rows($query_result);
Thus my while loop must be missing out the first result. Can anybody help me here? Moreover, could somebody explain what the while loop does because this is standard code I copied from PHPmanual without *really* understanding.