You should state more stuff, anyways, try this out:
PHP Code:
<?php
$username = "Username Here"; // Here is the username of who you want to get currencies from
$GetRanks = mysql_query("SELECT (credits,activity_points,seasonal_currency) FROM users WHERE username='$username' ORDER BY id DESC LIMIT 1; "); // Here you do the query, which will only select from the row: credits, activity_points and seasonal_currency from users. It will only fetch those who have the username '$username' [which was defined before]. It will get the latest one from the book only, which is ordered by the ID.
while($row = mysql_fetch_object($GetRanks)) // array with each inserted item, returning an object of the inserted row.
{
echo "{$username} have {$row->credits} credits, {$row->seasonal_currency} of seasonal currency,..."; // Here will show everything you need. Username, Credits and seasonal_currency, easily edited. You can do how you want, such as "echo $row->credits;", or however you want.
}
?>
Remember, there's a mysql injection over there, and I really hope you can manage to use it. Anyway, I left it commented for easy editing. If you need more help, do not be affraid to ask.
I didn't understand if you want to do a TOP 10, or whatever, so heres an example of top 10 of richest.
PHP Code:
<?php
$GetRanks = mysql_query("SELECT (username, credits,activity_points,seasonal_currency) FROM users ORDER BY credits DESC LIMIT 10; "); // Here we fetch username, credits, activity_points and seasonal_currency from table users, then we order by credits (big to small). If you want from small to big, use ASC instead of DESC.
while($row = mysql_fetch_object($GetRanks)) // array with each inserted item, returning an object of the inserted row.
{
echo "{$row->username} have {$row->credits} credits, {$row->seasonal_currency} of seasonal currency,..."; // as the example before... Little edited.
}
?>
If it isn't that what you are looking for, as said before, just ask, and I'll be glad to help.