Hello citizens,
I'm Rodi :: I'm releasing this script because alot people are having problems with MSSQL, and im working more on PHP these day's if you want some tutorials or something about PHP you can alway's message me.
From now on i will be on IcreamPIE or something...
live Previeuw : http://worldwidegunz.com/scripts/player%20ranking.php
Connection :
Code:<?php //Database Connection $dns="GunzDB"; $user="sa"; $pass=""; $connect=odbc_connect($dns, $user, $pass) or die ("Couldn't connect to the database, we're sorry..."); odbc_exec($connect,"use GunzDB"); ?>Code:<?php include ('theaboveconnctioninafile.php'); ?> <?php //get player ranking columns $query = odbc_exec($connect, "SELECT TOP 101* FROM Character WHERE DeleteFlag='0' ORDER BY Level DESC"); odbc_fetch_row($query); $name = odbc_result($query, "Name"); $point = odbc_result($query, "Level"); $wins = odbc_result($query, "KillCount"); $losses = odbc_result($query, "DeathCount"); $XP = odbc_result($query, "XP"); $time = odbc_result($query, "BP"); $playtime = odbc_result($query, "PlayTime"); $lasttime = odbc_result($query, "LastTime"); ?> <table width="1230" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="38"><b>#</b></td> <td width="96"><b>Character name</b></td> <td width="99"><b>Level</b></td> <td width="136"><b>KillCount</b></td> <td width="145"><b>DeathCount</b></td> <td width="114"><b>XP</b></td> <td width="129"><b>Bounty</b></td> <td width="137"><b>PlayTime</b></td> <td width="336"><b>Last played</b></td> </tr> <?php $rank2 = 0; while($rij3 = odbc_fetch_object($query)) { $rank2 = $rank2 + 1; { } ?> <tr> <td><?php echo $rank2; ?></td> <td><?php echo $rij3->Name; ?></td> <td><?php echo $rij3->Level; ?></td> <td><?php echo $rij3->KillCount; ?></td> <td><?php echo $rij3->DeathCount; ?></td> <td><?php echo $rij3->XP; ?></td> <td><?php echo $rij3->BP; ?></td> <td><?php echo $rij3->PlayTime; ?></td> <td><?php echo $rij3->LastTime; ?></td> </tr> <?php } ?> </table>


Reply With Quote![[ODBC] Player rankings](http://ragezone.com/hyper728.png)


