sorting - mysql get ranking list page -
i have table players in game, fields "name" , "score". want read 10 rows (=1 page display user) , 10 rows should ones include users name, order score.
i multiple queries.
first users score
select score table name = username
then see page translate
select count(*) table score > user_score
and read lines
select * table order score desc limit mod10(position), 10
but there way 1 query ?
Comments
Post a Comment