[insert_php]
$servername = “db.ravecraft.de”;
$username = “stats”;
$password = “survey”;
$dbname = “p_swr”;
$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 playername, kills, deaths, games_played, games_won, killdeath, score, blocksplaced FROM p_swr.swreloaded_player where score > 0 order by score desc limit 20”;
$result = $conn->query($sql);
echo “
Avatar | Player | Kills | Deaths | Spiele | Gew. | KD | Punkte | Blöcke |
---|---|---|---|---|---|---|---|---|
“; echo ““; echo “ |
“. $row[“playername”]; echo ” |
“. $row[“kills”]; echo ” |
“. $row[“deaths”]; echo ” |
“. $row[“games_played”]; echo ” |
” . $row[“games_won”]; echo ” |
” . round ($row[“killdeath”],$kd_rundung); echo ” |
” . $row[“score”] ; echo ” |
” . $row[“blocksplaced”] . “ |
“;
[/insert_php]