PDA

View Full Version : Top PVP List



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>';
?>

Chmun
02-08-08, 11:37 PM
Dude i've never seen u do PHP or giving credits to anyone else :S
Still for adding more stuff x1rep

Succy
03-08-08, 08:00 AM
Haha, I like it :P +Rep for both this and your arena top :P

Xcynic
03-08-08, 08:15 AM
oO very nice, Will be used...Great job.

LiLLeCarl
26-04-09, 12:05 AM
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in D:\xampp\htdocs\test\pvprealmpage\php\killranker.p hp on line 14