The idea is to run a sort of ranking MySQL command such as:
$sql = mysql_query("SELECT f_score FROM ".TBL_FACTIONS." ASC");
EDIT: I do need to add a WHERE f_id = $id in here too.
The numeric value in my MySQL database table in the *f_score* column should determine the rank. f_score contains only numeric values, from 0 to anything, user actions add and subtract from the score.
then use the $sql to loop through an array and "rank" each array element. I think it should assign a number to a specific variable so I can echo the number out on the webpage.
E.g. Your rank is: 01
I'm looking for something lightweight, but if its not possible to do this win minimum server usages, I'll have to shove it into a cron job or something which isn't really ideal. I was thinking along the lines of array and loops or something similar?
Any help would be greatly appreciated!
-Callum