4

对于服务器游戏......我有桌珠宝:

rank,player_id, plscore.

如果当前玩家不在前 10 名中,我想按他们的分数从高到低排序,加上当前玩家
分数目前10个。最多可拾取 70 颗宝石。

示例(所需):

__________________________________
  rank  |   player_id  |   plscore

   1        zorro007        70
   2        trus            70
   3        edvino          67
   4        snow.boy        65
   5        anida           61 
   6        nadal_raffo     58
   7        syskowitz       43
   8        misterProKill   27
   9        katamadu134     22
   10       ewrgreen89      16
   .             .          .
   .             .          .
   94       CURRENT PLAYER  7
___________________________________

图片: http: //postimg.org/image/3x8ktdjct/

4

1 回答 1

7
SELECT rank, player_id, plscore 
FROM table_name WHERE rank < 11 
OR player_id = current_player_id 
ORDER BY rank;
于 2013-11-11T13:27:11.460 回答