is verry necesar to store rank in table... coz i used in many way.
For example , if you see detail of player, you can't see what rank is...
example:
Name: alex
Points: 17.300
Rank: (from where to show it?)
Colonization: king's
So i need rank to sore in database table...
I found a solution,
CREATE temporary table seq ( seq int NOT NULL AUTO_INCREMENT, id int, PRIMARY KEY (`seq`));
INSERT INTO seq ( id, seq )
SELECT id, NULL FROM UsersTable ORDER BY points DESC;
UPDATE UsersTable INNER join seq ON UsersTable.id = seq.id SET UsersTable.rank = seq.seq;
Basically a temp table using an autonumber key, and inserting into that the id of the user ordered by the points. Then using that to do the update of the rank field in the users table.
So, if someone have something to improve that , many thanks !