Fix: add and update TypingExamRecord, TypingExamHighestRecord

This commit is contained in:
2019-07-16 09:03:43 +09:00
parent 3cb72799d4
commit 90f4219298
4 changed files with 175 additions and 109 deletions
+24 -12
View File
@@ -49,6 +49,18 @@ class TypingExamCollection extends DBMethodContainer
$stmt->close();
}
public function updateRecord($typingExamRecordID, $record)
{
$query = "
UPDATE typing_exam_record
SET Record = ?, RecordDateTime = NOW()
WHERE TypingExamRecordID = ?";
$stmt = $this->mysqli->prepare($query);
$stmt->bind_param("di", $record, $typingExamRecordID);
$stmt->execute();
$stmt->close();
}
public function deleteRecord($typingExamRecordID)
{
$query = "
@@ -73,18 +85,6 @@ class TypingExamCollection extends DBMethodContainer
$stmt->close();
}
public function updateHighestRecord($typingExamHighestRecordID, $record)
{
$query = "
UPDATE typing_exam_highest_record
SET HighestRecord = ?, RecordDateTime = NOW()
WHERE TypingExamHighestRecordID = ?";
$stmt = $this->mysqli->prepare($query);
$stmt->bind_param("di", $record, $typingExamHighestRecordID);
$stmt->execute();
$stmt->close();
}
public function getThisHourRecord($maestroID, $playerID)
{
$query = "
@@ -149,6 +149,18 @@ class TypingExamCollection extends DBMethodContainer
return $resultArray;
}
public function updateHighestRecord($typingExamHighestRecordID, $record)
{
$query = "
UPDATE typing_exam_highest_record
SET HighestRecord = ?, RecordDateTime = NOW()
WHERE TypingExamHighestRecordID = ?";
$stmt = $this->mysqli->prepare($query);
$stmt->bind_param("di", $record, $typingExamHighestRecordID);
$stmt->execute();
$stmt->close();
}
}
?>