11.06.2011, 23:24
I have mysql for over a month and i would like to create a top 5 players for on my website.
I hope somebody can help me with this.
I hope somebody can help me with this.
$order_query = mysql_query( "SELECT * FROM `accounts` ORDER BY `kills` LIMIT 5" );
while($order_fetch = mysql_fetch_assoc( $order_query ) )
echo( $order_fetch['username'] . ":" . $order_fetch['kills'] . " kills. <br />" ) ;
$order_query = mysql_query( "SELECT * FROM `accounts` ORDER BY `kills` DESC LIMIT 5" );
while($order_fetch = mysql_fetch_assoc( $order_query ) )
echo( $order_fetch['username'] . ":" . $order_fetch['kills'] . " kills. <br />" ) ;