Missing one record in PHP loop

Hopefully this is an easy one - I basically have a little loop to display records from a table of reviews on a page here :

ereader reviews.

However, the most recent record isn’t displaying - so its like its missing the first record in the table, depending on the sort order.

The query is just :

mysql_select_db($database_connPixelar, $connPixelar);
$query_rsReviews = "SELECT * FROM feedback WHERE Approved = 'Yes' ORDER BY feedbackID DESC";
$rsReviews = mysql_query($query_rsReviews, $connPixelar) or die(mysql_error());
$row_rsReviews = mysql_fetch_assoc($rsReviews);
$totalRows_rsReviews = mysql_num_rows($rsReviews);

And the little loop looks like this :

     $groups = array(); 
while ($row = mysql_fetch_assoc($rsReviews)) { 
    $groups[$row['Product']][] = $row; 
foreach ($groups as $product_name => $rows) { 
    echo "<tr><td class=\\"product\\">$product_name</td></tr>"; 
    foreach ($rows as $row) { 
        echo "<tr><td class=\\"review\\">".$row['Review']."</td></tr>"; 
        echo "<tr><td class=\\"name\\">".$row['CustomerName']."</td></tr>";
        echo "<tr><td class=\\"date\\">".$row['Date']."</td></tr>";

If any one could shed any light on how to get it to display all the records that would be much appreciated.


Thank you - that’s all OK now.

You are calling mysql_fetch_assoc($rsReviews); twice - once after the query and then in the loop.

Delete the first one: $row_rsReviews = mysql_fetch_assoc($rsReviews); and it will be fine