php mysqli help, first line in DB not being returned?
Posted
by
williamsongibson
on Stack Overflow
See other posts from Stack Overflow
or by williamsongibson
Published on 2012-11-12T16:57:28Z
Indexed on
2012/11/13
5:00 UTC
Read the original article
Hit count: 82
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?
© Stack Overflow or respective owner