StickyIcky
02-08-08, 07:13 PM
This will list the Top PVPers of your realm
<?php
$db_host='hostname';
$db_db='dbname';
$db_user='user';
$db_pas='password';
$connection = @mysql_connect($db_host, $db_user, $db_pass);
$db_select = @mysql_select_db($db_db);
$query = 'SELECT name, killsLifeTime FROM characters WHERE killsLifeTime > 0 ORDER BY killsLifeTime DESC LIMIT 10'; // Change the 10 to the number of results (10 for top 10, 100 for top 100, etc)
$pvplist = @mysql_query($query);
echo '<table>';
while($pvp_row = mysql_fetch_assoc(($pvplist)))
{
echo '<tr><td>'. $pvp_row["name"] .'</td><td>'. $pvp_row["killsLifeTime"] .'</td></tr>';
}
echo '</table>';
?>
<?php
$db_host='hostname';
$db_db='dbname';
$db_user='user';
$db_pas='password';
$connection = @mysql_connect($db_host, $db_user, $db_pass);
$db_select = @mysql_select_db($db_db);
$query = 'SELECT name, killsLifeTime FROM characters WHERE killsLifeTime > 0 ORDER BY killsLifeTime DESC LIMIT 10'; // Change the 10 to the number of results (10 for top 10, 100 for top 100, etc)
$pvplist = @mysql_query($query);
echo '<table>';
while($pvp_row = mysql_fetch_assoc(($pvplist)))
{
echo '<tr><td>'. $pvp_row["name"] .'</td><td>'. $pvp_row["killsLifeTime"] .'</td></tr>';
}
echo '</table>';
?>