0
Could anyone help me in detecting error in my PHP MySQL code
When i search num of rows using mysqli_num_rows gives my more than one records But when i use the same query in while loop to fetch records i get single record that repeats and never stops https://code.sololearn.com/wuEz9JK2BXt1/?ref=app
1 Antwort
0
if (mysqli_num_rows($records) > 0) {
while($data = mysqli_fetch_assoc($records) ){
//but continue to show a single record again and again
echo $data['id']."<br>";
}
}
try this