From 5cb864058f4942ebc8bf49927cb7ac8a86e6da81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=84=8B=E1=85=A2=E1=84=91=E1=85=B3=E1=86=AF=20=E1=84=82?= =?UTF-8?q?=E1=85=A9=E1=84=90=E1=85=B3=E1=84=87=E1=85=AE=E1=86=A8?= Date: Fri, 26 Oct 2018 08:13:41 +0900 Subject: [PATCH] Add: delete maestro player app highest record --- .../maestro/delete_test_player_record.php | 24 +++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/web/server/maestro/delete_test_player_record.php b/src/web/server/maestro/delete_test_player_record.php index b226422..56510fd 100644 --- a/src/web/server/maestro/delete_test_player_record.php +++ b/src/web/server/maestro/delete_test_player_record.php @@ -13,7 +13,8 @@ if($maestro_test_player_id === null) { exit; } -delete_maestro_test_player_record($maestro_test_player_id); +delete_maestro_test_player_best_record($maestro_test_player_id); +delete_maestro_test_player_app_highest_record($maestro_test_player_id); $replyJSON["PlayerID"] = $maestro_test_player_id; $replyJSON["RESULT"] = "ok"; @@ -43,7 +44,7 @@ function get_maestro_test_player_id($maestro_id) { return $maestro_test_player_id; } -function delete_maestro_test_player_record($player_id) { +function delete_maestro_test_player_best_record($player_id) { global $db_conn; $query = " @@ -62,4 +63,23 @@ function delete_maestro_test_player_record($player_id) { $stmt->close(); } +function delete_maestro_test_player_app_highest_record($player_id) { + global $db_conn; + + $query = " + DELETE + FROM app_highest_record + WHERE PlayerID = ? + "; + $stmt = $db_conn->prepare($query); + $stmt->bind_param('i', $player_id); + $stmt->execute(); + // $stmt->bind_result($maestro_test_player_id); + // while($stmt->fetch()) { + // ; + // } + $stmt->fetch(); + $stmt->close(); +} + ?> \ No newline at end of file