Monomalo00
http://leiends.ml/
- Joined
- Nov 13, 2010
- Messages
- 120
- Solutions
- 1
- Reaction score
- 4
Hello again, someone knows how i can add the KD to my website? (taking the info from DB)
This sidebar its for Frags and i want transform for KD/R, i have some idea but i dont know how to do. My is idea taking Frags + Deaths from DB and make a average.
Thanks you
This sidebar its for Frags and i want transform for KD/R, i have some idea but i dont know how to do. My is idea taking Frags + Deaths from DB and make a average.
Thanks you
Code:
<div class="sidebar">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><img src="IMAGE"></h3>
</div>
<div class="panel-body">
<table class="table table-condensed table-content table-striped">
<tbody>
<?php
$test = $SQL->query("SELECT `name`,`frags` FROM players ORDER BY `frags` DESC LIMIT 5");
$count = 1;
foreach ($test as $display) {
if (strlen($display['name']) > 15) { $valuex = substr($display['name'],0,10).'...'; } else { $valuex = $display['name']; }
echo '<tr><td width="10%">' . $count++ . '.</td><td width="60%"><a href="?subtopic=characters&name=' . $display['name'] . '">' . $valuex . '</a></td><td><span class="label label-primary">Kills. '.$display['frags'].'</span></td></tr>';
}
?>
</tbody>
</table>
</div>
</div>