Skip to content
Advertisement

Why is my while loop spitting out the same row 50+ times? PHP

Here is my code:

JavaScript

And here is the while loop:

JavaScript

This is just returning 50+ of the same row, aka the only row in the database, but it should only return it once?

Advertisement

Answer

You’re running the query again in each loop.

JavaScript

GetLatestUsers should return the statement.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement