I table called rankings. There is user_id, user_name, and user_rank.
What I would like to do is be able to select row # for a user_id when the table is sorted by user_rank DESC. The row # would reflect the rank that that user is in. Basically, I don't want to store the rank Number, I want to have it automatically assigned based on the user_rank. However, I don't want to have to loop through the entire table to do it. Anyone know an easy way to do this?
(linux, mysql)