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

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -