You want to get the rank in MySQL. Here is one approach:
SELECT id, name, @rn := @rn+1 as `rank`
from `users` cross join (select @rn := 0) const
ORDER BY points desc
You want to get the rank in MySQL. Here is one approach:
SELECT id, name, @rn := @rn+1 as `rank`
from `users` cross join (select @rn := 0) const
ORDER BY points desc