php mysqli帮助,DB中的第一行没有返回?

Here is my code

     <?php require_once 'connect.php';

                    $sql = "SELECT * FROM `db-pages`";
                    $result = $mysqli->query($sql) or die($mysqli->error.__LINE__);
                        while ($row = $result->fetch_assoc()) {
   echo($row['pagetitle'].' - To edit this page <a href="editpage.php?id='.$row['id'].'">click here</a><br>');
 }  
                    }
      ?>

I've added a couple more rows to the Database and it's returning them all, apart from id=1 in the DB. Any idea why?

try it like this:

 while ($row = $result->fetch_assoc()) {
   echo($row['pagetitle'].' - To edit this page <a href="editpage.php?id='.$row['id'].'">click here</a><br>');
 }  

Double check the title and ensure it's got nothing that will affect php out-putting it.

Also escape all of your DB output using htmlentities, it makes for good practise in the event someone gets creative.