Hey guys,
Here is my situation: I want to make a ranking system, which will rank users on their points. However the catch is, it should only be updated every 10 or 20 minutes so that ther is no confusion while users are comparing ranks. In the user table I have included a points field as well as a rank field. The points field can get updated over 10 or 20mins easily, that works, however I have no idea how to update ranks in a query. Can anyone shed some light on this?
Or something?
Here is my situation: I want to make a ranking system, which will rank users on their points. However the catch is, it should only be updated every 10 or 20 minutes so that ther is no confusion while users are comparing ranks. In the user table I have included a points field as well as a rank field. The points field can get updated over 10 or 20mins easily, that works, however I have no idea how to update ranks in a query. Can anyone shed some light on this?
Code:
UPDATE table SET rank=(SELECT rank ORDER BY points WHERE user='username')...
Comment