查用户排名

select  m.*,@r:=@r + 1 as rank from (SELECT @r:=0) r,userinfo as m order by m.id desc;

 

相关文章: