Answer the question
In order to leave comments, you need to log in
Simple sql query not returning all records?
The code is the following:
$query2 ='SELECT pid, title, filename FROM photos WHERE pid=' . $row['id'];
$result2 = mysqli_query($link, $query2);
$row2 = mysqli_fetch_array($result2);
while( $row2 = mysqli_fetch_assoc($result2) ){
echo ' query2 - '.$row2['pid'] . ' '.$row2['filename'] . '<br>';
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question