Creating your own Leaderboard / Highscores Easy and Free (PHP & MySQL) [UPDATED 2020]

You're viewing a single comment in a conversation. View all the comments
  • 7 Comments

  • Order by
  • So in getscores.php I have changed it to this so I get 12 lines of results??:

    // Retrieve data from database

    $sql = "SELECT *

    FROM scores

    ORDER BY score

    LIMIT 24"; // The 'LIMIT 24' part will only read 24 scores. Feel free to change this value

    $result = mysqli_query($con, $sql);

    I currently have 10 scores in my database but my leaderboard is still only showing 5 scores. Is there anything else I need to change in php files or in Construct to adjust the array size?

    Thank you for looking into this for me. It has nothing to do with the initial values being 0 does it? and since 0 is a faster 'time' than other results in my database that it is showing these instead? Although the 0s are not being ordered at the top of the leaderboard so I'm guessing that isn't what's happening. The returned rank IS taking into account all the database records so I still haven't a clue.