Spieler Informationen
connect_error) { die(“Verbindung fehlgeschlagen: ” . $conn->connect_error); } // UUID des Spielers aus der Tabelle ‘uuidfetcher’ holen $uuid_query = $conn->prepare(“SELECT uuid FROM uuidfetcher WHERE username = ?”); $uuid_query->bind_param(“s”, $mc_username); // Den Benutzernamen an die Abfrage binden $uuid_query->execute(); $uuid_result = $uuid_query->get_result(); if ($uuid_result->num_rows > 0) { // UUID gefunden, nun die Daten des Spielers holen $row = $uuid_result->fetch_assoc(); $player_uuid = $row[‘uuid’]; // Daten aus der ‘player’-Tabelle holen $player_query = $conn->prepare(“SELECT firstjoin, lastjoin FROM player WHERE uuid = ?”); $player_query->bind_param(“s”, $player_uuid); // UUID an die Abfrage binden $player_query->execute(); $player_result = $player_query->get_result(); if ($player_result->num_rows > 0) { // Spieler-Daten anzeigen $player_data = $player_result->fetch_assoc(); echo ““;
echo “
“;
} else {
echo “First Join: ” . $player_data[‘firstjoin’] . “
“; echo “Last Join: ” . $player_data[‘lastjoin’] . “
“; echo “Keine Spieler-Daten für UUID: $player_uuid gefunden.
Spielername nicht in der UUID-Datenbank gefunden.