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

25th Jun 2021, 7:48 AM
Sameer Javed
Sameer Javed - avatar
1 Resposta
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
25th Jun 2021, 8:55 AM
KuFiz
KuFiz - avatar