<?php
$top10 = $mysqli->query("SELECT * FROM entries ORDER BY Votes ASC");
if ($top10->num_rows > 0) {
// output data of each row
while($row = $top10->fetch_assoc()) {
echo "<li>" . $row['name'] . " " . "Votes: " . $row['Votes'] . "</li>";
}
} else {
echo "0 results";
}
?>
Instead of returning each row from the db, this just returning itself starting with query("SELECT ...