Fix: delete player info - writing exam record

This commit is contained in:
2019-12-21 22:25:59 +09:00
parent ae7489da8a
commit 3a651313db
3 changed files with 121 additions and 20 deletions
+33
View File
@@ -10,6 +10,10 @@ $playerID = $_POST["player_id"];
deleteAppHighestRecord($maestroID, $playerID);
deleteBestRecord($maestroID, $playerID);
deleteTypingExamHighestRecord($maestroID, $playerID);
deleteTypingExamRecord($maestroID, $playerID);
deleteLicenseScore($maestroID, $playerID);
deleteLicenseTime($maestroID, $playerID);
@@ -65,6 +69,35 @@ function deleteBestRecord($maestroID, $playerID) {
$stmt->close();
}
function deleteTypingExamHighestRecord($maestroID, $playerID) {
global $db_conn;
$query = "
DELETE FROM typing_exam_highest_record
WHERE MaestroID = ? AND PlayerID = ?
";
$stmt = $db_conn->prepare($query);
$stmt->bind_param("ii", $maestroID, $playerID);
$result = $stmt->execute();
$stmt->close();
}
function deleteTypingExamRecord($maestroID, $playerID) {
global $db_conn;
$query = "
DELETE FROM typing_exam_record
WHERE MaestroID = ? AND PlayerID = ?
";
$stmt = $db_conn->prepare($query);
$stmt->bind_param("ii", $maestroID, $playerID);
$result = $stmt->execute();
$stmt->close();
}
function deleteLicenseScore($maestroID, $playerID) {
global $db_conn;