13.03.2012, 12:16
Quote:
Hi Again BaubaS,
I have been looking around and stumbled across a different method. However this method assumes that you already have the players money. So for instance the user is online and wants to know their money rank, you know they have 1000. You would then exectue the following query: PHP код:
Player A has 1000 Player B has 2000 Player C has 3000 If player A initiates this query then it will look for all users who have more money than him and return the number of results it finds, in this case 2. Therefore player A's position is 3. Hope that made sense. Cheers, TJ |
SELECT COUNT(id) AS count FROM `table_name` WHERE money > '0'