타자 시험 최근 7번 기록 검색 query문 수정

This commit is contained in:
2026-09-15 20:37:52 +09:00
parent 99631c1061
commit e87e38dbac
2 changed files with 2 additions and 4 deletions
+1 -2
View File
@@ -169,12 +169,11 @@ class TypingExamCollection extends DBMethodContainer
FROM typing_exam_record
WHERE MaestroID = ? AND PlayerID = ? AND WritingID = ?
AND RecordDateTime < DATE(?) + INTERVAL 1 DAY
AND RecordDateTime >= DATE(?) - INTERVAL 7 DAY
GROUP BY DATE(RecordDateTime)
ORDER BY RecordDateTime DESC
LIMIT 7";
$stmt = $this->mysqli->prepare($query);
$stmt->bind_param('iisss', $maestroID, $playerID, $writingID, $date, $date);
$stmt->bind_param('iiis', $maestroID, $playerID, $writingID, $date);
$stmt->execute();
$stmt->bind_result($date, $highestRecord);
+1 -2
View File
@@ -25,7 +25,6 @@ function get_history_record($maestro_id, $app_id, $player_id, $date) {
ON BR.AppID = AA.AppID
WHERE BR.MaestroID = ? AND BR.AppID = ? AND BR.PlayerID = ?
AND BR.RecordDateTime < DATE(?) + INTERVAL 1 DAY
AND BR.RecordDateTime >= DATE(?) - INTERVAL 7 DAY
GROUP BY DATE(BR.RecordDateTime)
ORDER BY DATE(BR.RecordDateTime) DESC
LIMIT 7
@@ -37,7 +36,7 @@ function get_history_record($maestro_id, $app_id, $player_id, $date) {
$query = "SELECT DATE(BR.RecordDateTime) AS Date, MIN(BR.BestRecord) AS HighScore, AA.AppName AS AppName".$query;
}
$stmt = $db_conn->prepare($query);
$stmt->bind_param('iisss', $maestro_id, $app_id, $player_id, $date, $date);
$stmt->bind_param('iiis', $maestro_id, $app_id, $player_id, $date);
$stmt->execute();
$stmt->bind_result($date, $score, $app_name);