I am trying to get a list of highscores (top 10) of players that played my game. Everything works except for one thing, the list isn't right. The first 10 people are correct, but when i go to page 2 the list isn't further going done.
Variables Explain
$gamemode = "Endless"
$filter = "Score"
$startNum = Page1 = 0, Page2 = 10
$maxlimit = 10
Query:
$query = "SELECT ID, Gamemode, Name, Score, ContainersSaved, TimePlayed, Date, ScorePerMinute
FROM $dbName . `highscore`
WHERE Gamemode='$gamemode'
ORDER by `$filter` DESC
LIMIT $startNum, $maxlimit";
Does anyone know what im doing wrong?
I fixed it, i forgot to change the 'Score' field from varchar to an INT, so it was trying to Descend on string instead of INT.
Thanks to the tip Imaginaerum gave me :)