I have the following code which when pulled from the database in an ascending order (ASC) works perfectly, but when pulled in a DESC order a row from the database goes missing. Can anyone offer any pointers? <?php require_once "../connect_mysql.php"; $sql = 'SELECT linkurl, linklabel, writtenby, lastmodified, byphrase FROM newarchive WHERE id BETWEEN 1 AND 20 ORDER BY id ASC'; $result = mysqli_query($myConnection, $sql) or die (mysqli_error($myConnection)); $row = mysqli_fetch_array($result) or die(mysql_error()); mysqli_close($myConnection); ?> Code (markup): < ?php $counter = 2; while ($row = mysqli_fetch_array( $result, $counter <= 1048576 )) { echo "<div class='newstruc'><div class='bytitle'>"; echo '<a href="' . $row['linkurl'] . '">' . $row['linklabel'] . '</a><br />'; echo "</div>"; echo "<div class='byline'><span class='byline1'>"; echo "written by: "; echo $row ['writtenby']; echo "</span>"; echo " | "; echo "<span class='byline2'>"; echo $row['lastmodified']; echo "</span></div>"; echo "<div class='byphrase'>"; echo $row ['byphrase']; echo "</div></div>"; $counter = $counter * 2; } ?> Code (markup):