php - Mysql query, select from a determined point on -


i have table player rankings , want tell player 5 players above him. how make such query?

here table:

create table if not exists `ladder_rankings` (   `player_id` int(11) not null,   `ladder_points` int(11) not null,   key `player_id` (`player_id`) ) engine=myisam default charset=latin1; 

so, like:

select * ladder_rankings ladder_points >10 order ladder_points desc limit 5  

the problem show top players , not ones above me directly. imagining have 10 points. if in position 230 want guys on 225, 226, 227, 228 , 229.

joan, query like:

select *      (select *           ladder_rankings           ladder_points > (select ladder_points                              ladder_rankings                              player_id = %current_player%)           order ladder_points asc           limit 5) next_5  order ladder_points desc 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -