$get_top10 = mysqli_query($con, "SELECT name, daily_points, daily_win FROM players WHERE daily_points > 0 ORDER BY daily_points DESC LIMIT 10");
I am needing a string like: name, daily_points, daily_win, name, daily_points, daily_win (etc up to 10 records)
php 7.4.27 mysql 5.6.51-cll-lve
This did the trick, let me know if there is a better or preferred method.
$sql = ("SELECT name, daily_points, daily_win FROM players WHERE daily_points > 0 ORDER BY daily_points DESC LIMIT 10");
$result = mysqli_query($con, $sql);
if (mysqli_num_rows($result)) {
while ($row = mysqli_fetch_assoc($result)) {
echo "{$row['name']},{$row['daily_points']},{$row['daily_win']},";
}
}