duelfi_api/get_game_history.php
2025-04-11 05:02:06 +08:00

19 lines
343 B
PHP

<?php
include('connection.php');
$conn = OpenCon();
$username= $_GET['uid'];
$selectSql = "SELECT * FROM Game_History WHERE master_id='$username' OR client_id='$username'";
$selectQuery = mysqli_query($conn, $selectSql);
$arr = [];
while($row = mysqli_fetch_assoc($selectQuery)){
array_push($arr, $row);
}
echo json_encode($arr);
?>