The code below only returns the first row, and then repeats it until the script times out. i don't want it to do this, i want it to iterate over all the rows returning all the "names" in the database. what am i doing wrong?
everything i found on php.net seems to align with what i have when it comes to procedural style. I don't even speak object-oriented yet, so please don't point me to that.
the only thing i can figure is that there is a problem in my while() conditional, but i don't know what it would be.
- Code: Select all
$connect = mysqli_connect('localhost', $u_name, $p_word, $db_name);
$query = "SELECT * FROM `Dealers` LIMIT 0, 5 ";
$result = mysqli_query ($connect, $query);
$row = mysqli_fetch_assoc($result);
echo 'here are the results: ' ;