connect_error) { die("Connection failed: " . $conn->connect_error); } // データを取得 $sql = "SELECT user_id, user_name, tact_number, game_level, game_number, game_name, is_correct, play_end_time FROM game_scores_tact ORDER BY play_end_time DESC"; $result = $conn->query($sql); if ($result->num_rows > 0) { echo ""; echo ""; while($row = $result->fetch_assoc()) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo "
ユーザーIDユーザー名TACTナンバーゲームレベルゲーム番号ゲーム名正誤プレイ終了時間
" . htmlspecialchars($row["user_id"]) . "" . htmlspecialchars($row["user_name"]) . "" . htmlspecialchars($row["tact_number"]) . "" . htmlspecialchars($row["game_level"]) . "" . htmlspecialchars($row["game_number"]) . "" . htmlspecialchars($row["game_name"]) . "" . ($row["is_correct"] == 1 ? "○" : "×") . "" . htmlspecialchars($row["play_end_time"]) . "
"; } else { echo "結果がありません"; } $conn->close(); ?>