时间:2021-07-01 10:21:17 帮助过:28人阅读
select a.username,(@rowNum:[email protected]+1) as c,a.integral as 积分
from xs_user a,(Select (@rowNum :=0 ) ) b order by integral DESC,time
SELECT * FORM
(
select a.username,(@rowNum:[email protected]+1) as c,a.integral as 积分
from xs_user a,(Select (@rowNum :=0 ) ) b order by integral DESC,time
) T
WHERE username='XXX'