[insert_php]
$servername = “db.ravecraft.de”;
$username = “stats”;
$password = “survey”;
$dbname = “p_bwr”;
$kd_rundung = 2; // KD-Value, Stellen nach dem Komma
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die(“Connection failed: ” . $conn->connect_error);
}
$sql = “SELECT name, kills, deaths, wins, loses, kd, score FROM p_bwr.bw_stats_players where score > 0 order by score desc limit 20”;
$result = $conn->query($sql);
echo “
Icon | Player | Kills | Deaths | Gew. | Verl. | KD | Punkte |
---|---|---|---|---|---|---|---|
“; echo ““; echo “ |
“. $row[“name”]; echo ” |
“. $row[“kills”]; echo ” |
“. $row[“deaths”]; echo ” |
” . $row[“wins”]; echo ” |
” . $row[“loses”]; echo ” |
” . round ($row[“kd”],$kd_rundung); echo ” |
” . $row[“score”] . “ |
“;
[/insert_php]