MySQL not pulling all rows.
Hey guys, first time using stackoverflow.

can you guys help me debug?

Heres the problem, this query is selecting all of the rows from my database, its only outputting the first one twice for some reason.

    <?php
                        
      $top10_query = "SELECT * FROM kicks";
      $result = mysqli_query($cxn, $top10_query) or die("Couldn't execute query.");
      $row = mysqli_fetch_assoc($result);
      
      $rating = $row['rating'];
      $description = $row['description'];
      $completed = $row['completed'];
      $userid = $row['userid'];
      $posted = $row['posted'];
      
      while($row = mysqli_fetch_assoc($result)) {
       echo "<tr>";
        echo "<td class='rating'>" . $rating . "</td>";
        echo "<td class='description'>" . $description . " </td>";
        echo "<td class='completed_" . $completed . "'>" . $completed  . "</td>";
        echo "<td class='author'>";
         echo "Posted by: <a href='profile?userid=" . $userid . "'>" . $userid . "</a><br />";
         echo "on "; echo $posted;
        echo "</td>";
       echo "</tr>";
      }
      ?>
MySQL not pulling all rows.
===

Hey guys, first time using stackoverflow.

can you guys help me debug?

Heres the problem, this query is selecting all of the rows from my database, its only outputting the first one twice for some reason.

    <?php
                        
      $top10_query = "SELECT * FROM kicks";
      $result = mysqli_query($cxn, $top10_query) or die("Couldn't execute query.");
      $row = mysqli_fetch_assoc($result);
      
      $rating = $row['rating'];
      $description = $row['description'];
      $completed = $row['completed'];
      $userid = $row['userid'];
      $posted = $row['posted'];
      
      while($row = mysqli_fetch_assoc($result)) {
       echo "<tr>";
        echo "<td class='rating'>" . $rating . "</td>";
        echo "<td class='description'>" . $description . " </td>";
        echo "<td class='completed_" . $completed . "'>" . $completed  . "</td>";
        echo "<td class='author'>";
         echo "Posted by: <a href='profile?userid=" . $userid . "'>" . $userid . "</a><br />";
         echo "on "; echo $posted;
        echo "</td>";
       echo "</tr>";
      }
      ?>