Strage Strange ERROR - does not print out the 1st row


We are getting a very strange ERROR!

We have a MySQL Query which returns 5 rows, as you can see from:

echo '<p>Num Rows: ’ . mysql_num_rows($query_get_blogs);

and it prints 5.

And btw of course we have ran the MySQL SELECT command that is to return this list in the MySQL query
browser and we see that it returns 5 rows.

But when we go to print out these rows on the Web page, it DOES NOT print out the 1st row and instead
it prints out 4 rows!!!

That is this Php command is printing out only 4 rows whereas there are 5 rows in the list:

while ($result_get_blogs = mysql_fetch_array($query_get_blogs)) {

$blog_id = $result_get_blogs['blog_id'];

<tr bgcolor=“#ffffff”>
<td align=“left”>
<?php echo $num; ?>
<td align=“left” colspan=“6”>
<?php echo $blog_id; ?>

What the HEK is going on that it is not printing our the 1st row!


Check to see if you are ever calling mysql_fetch_array($query_get_blogs) prior to your while loop, or calling mysql_fetch_assoc($query_get_blogs) prior to your while loop


Yes, that was the problem.
By some strange Osmosis there was a call to mysql_fetch_array($query_get_blogs) before the while loop!
Cant believe we missed that!
Thanx for your budge.

Have a great day :slight_smile: