13.03.2012, 10:49
Hi BaubaS,
When you say by money, I assume you mean you want to determine which player has X amount of money? If so you can use the following:
"%d" obviously being the amount of money, however if you are looking to see how many people have X amount of money, you would do the following:
Hope it helped.
Cheers,
TJ
EDIT: I think I actually understand a little better, you want to rank the players in order of money. In which case you would use the following:
This query would return a list of players in order of money from highest to lowest, the first result would be the player who currently has the most amount of money.
When you say by money, I assume you mean you want to determine which player has X amount of money? If so you can use the following:
PHP код:
SELECT `column_name` FROM `table_name` WHERE money = '%d'
PHP код:
SELECT COUNT(id) AS count FROM `table_name` GROUP BY money
Cheers,
TJ
EDIT: I think I actually understand a little better, you want to rank the players in order of money. In which case you would use the following:
PHP код:
SELECT name FROM `table_name` ORDER BY money DESC