Top Kills in Mysql
#5

Код:
$result = mysql_query('SELECT * FROM Users ORDER BY kills DESC');
$i=0;
echo "<center>";
echo "Top 15 - Murder Machines:";
echo "<table width='0'
    border='1'
	  font-size='10'
    cellpadding='0'
    align='center'>
   <tr>
   		<td width='80px' align='left' valign='middle'>
		<b>Name</b>
		</td>
		<td width='80px' align='left' valign='middle'>
		<b>Kills</b>
		</td>
		<td width='80px' align='left' valign='middle'>
		<b>Deaths</b>
		</td>
		<td width='80px' align='left' valign='middle'>
		<b>Times logged in</b>
		</td>
		<td width='80px' align='left' valign='middle'>
		<b>Messages</b>
		</td>
		<td width='80px' align='left' valign='middle'>
		<b>Level</b>
		</td>";
while(($row = mysql_fetch_array($result)) AND $i<15)
{
 $i++;
 echo "<tr><td width='0' align='left' valign='middle'>
		". $row['username'] ."
		</td>
		<td width='0' align='left' valign='middle'>
		". $row['kills'] ."
		</td>
		<td width='0' align='left' valign='middle'>
		". $row['deaths'] ."
		</td>
		<td width='0' align='left' valign='middle'>
		". $row['logs'] ."
		</td>
		<td width='0' align='left' valign='middle'>
		". $row['chats'] ."
		</td>
		<td width='0' align='left' valign='middle'>
		". $row['level'] ."</td>";
}
echo "<tr></table>";
Reply


Messages In This Thread
Top Kills in Mysql - by scooby307 - 09.01.2009, 15:03
Re: Top Kills in Mysql - by ICECOLDKILLAK8 - 09.01.2009, 16:30
Re: Top Kills in Mysql - by scooby307 - 09.01.2009, 18:11
Re: Top Kills in Mysql - by scooby307 - 09.01.2009, 19:58
Re: Top Kills in Mysql - by Antironix - 09.01.2009, 20:37
Re: Top Kills in Mysql - by scooby307 - 09.01.2009, 20:47
Re: Top Kills in Mysql - by ICECOLDKILLAK8 - 09.01.2009, 23:59
Re: Top Kills in Mysql - by Kriztian - 10.01.2009, 00:00
Re: Top Kills in Mysql - by scooby307 - 10.01.2009, 14:09
Re: Top Kills in Mysql - by scooby307 - 10.01.2009, 16:05

Forum Jump:


Users browsing this thread: 1 Guest(s)