更新时间:2022-06-09 22:19:30
首先,查询该特定用户的分数:
First, query the score for that particular user:
select score
from users
where id = 42
说用户42的得分是6.您可以查询下一个用户,例如:
Say the score for user 42 is 6. You can then query the next user like:
select name
, score
from users
where score > 6
order by
score
limit 1
和以前的用户类似:
select name
, score
from users
where score < 6
order by
score desc
limit 1