Newbie Spellweaver
- Joined
- Dec 4, 2007
- Messages
- 67
- Reaction score
- 19
It's a Simple List for the pvp ranking and reputation of the players script.
The same uses own connection from the server API.
A SS from this script:
Tutorial check C://innetpub/wwwroot/api/php/dbinfo.inc.php
and open and edit the line:
and edit
Open Notepad and put this on.
Note:
This is a base of a rankking
Modify the will to your liking.
To change the number of players move in this line
Change 10 to the amount of your choice
The same uses own connection from the server API.
A SS from this script:
Tutorial check C://innetpub/wwwroot/api/php/dbinfo.inc.php
and open and edit the line:
Code:
echo "Connection Could be established. \ n";
and edit
Code:
echo "";
Open Notepad and put this on.
Code:
<?php require "../api/php/dbinfo.inc.php" ?>
<title>Ranking</title>
<?PHP
// Especificar tabela a usar
$table = 'UsersChars';
// Query
$strSQL = "SELECT TOP 10 *
FROM UsersChars
ORDER BY Stat01 DESC
";
?>
<table border="1" style="width:300px">
<tr>
<td>Nome</td>
<td>Kills</td>
<td>Reputacao</td>
</tr>
<?php
$objQuery = sqlsrv_query($conn, $strSQL) or die ("Erro ao executar a query: [".$strSQL."]");
while($objResult = sqlsrv_fetch_array($objQuery))
{
$tag = $objResult["Gamertag"];
$kills = $objResult["Stat01"];
$rep = $objResult["Reputation"];
?>
<?php
/*echo "<tr><td>";
echo $tag;
echo "</td><td> | Kills = <font color=red>";
echo $objResult["Stat01"];
echo "</font></td></tr>";*/
?>
<tr>
<td><?PHP echo $tag?></td>
<td><?PHP echo $kills?></td>
<td><?PHP echo $rep?></td>
</tr>
<?php
}
?>
</table>
Note:
This is a base of a rankking
Modify the will to your liking.
To change the number of players move in this line
Code:
$ strSQL = "SELECT TOP 10 *
Change 10 to the amount of your choice
Attachments
You must be registered for see attachments list
Last edited: