This is because with this query users with the same highscore are each counted. As I suggested, you should probably drop the COUNT() and the last GROUP BY (which work together), add the username and time to the query and count them yourself (as you did before).Returns a the username and the amount of highscores the user has, but when I add them all up, it comes to 1086 even though there are only 751 games
Also, add a composite index on gamename + score
Code: Select all
ALTER TABLE `arcade_highscores` ADD INDEX ( `gamename` , `score` ) ;