select a.rank_no
from (
select user.id as id, @rank:=@rank + 1 AS rank_no
from user, (SELECT @rank := 0) b
ORDER BY performance_score DESC
)
as a
where a.id = 条件值
select a.rank_no
from (
select user.id as id, @rank:=@rank + 1 AS rank_no
from user, (SELECT @rank := 0) b
ORDER BY performance_score DESC
)
as a
where a.id = 条件值