I want to select two fields from the database, id
an photo-url
.
Code is:
$results = mysqli_query($connecDB,"SELECT id, photo-url FROM list ORDER BY id ASC LIMIT ".$position.", ".$item_per_page."");
while($row = mysqli_fetch_array($results)){
echo '<li id="item_'.$row["id"].'">'.$row["id"].'. <span class="page_name">'.$row["photo-url"].'</li>';
}
echo '</ul>';
Problem is:
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in...(line while).