Add: HintBubble

Fix: chocoball color
Fix: history, ranking DB
This commit is contained in:
2019-05-11 16:14:17 +09:00
parent a02e75e06a
commit edb8b43020
10 changed files with 145 additions and 86 deletions
+21 -18
View File
@@ -24,16 +24,17 @@ function get_ranking_hour($maestroID, $appID) {
global $db_conn;
$query = "
SELECT BR.PlayerID As PlayerID, P.Name AS Name, MAX(BR.BestRecord) AS BestRecord
FROM best_record BR, player P
WHERE BR.PlayerID = P.PlayerID AND DATE(BR.RecordDateTime) = DATE(NOW()) AND HOUR(BR.RecordDateTime) = HOUR(NOW()) AND BR.MaestroID = ? AND BR.AppID = ?
GROUP BY BR.PlayerID
ORDER BY max(BR.BestRecord)
";
if(is_highest_record_prefer_app($appID))
$query = $query." DESC;";
else
$query = $query." ASC;";
if(is_highest_record_prefer_app($appID)) {
$query = "SELECT BR.PlayerID As PlayerID, P.Name AS Name, MAX(BR.BestRecord) AS BestRecord".$query;
$query = $query."ORDER BY max(BR.BestRecord) DESC;";
} else {
$query = "SELECT BR.PlayerID As PlayerID, P.Name AS Name, MIN(BR.BestRecord) AS BestRecord".$query;
$query = $query."ORDER BY min(BR.BestRecord) ASC;";
}
$stmt = $db_conn->prepare($query);
$stmt->bind_param('ii', $maestroID, $appID);
$stmt->execute();
@@ -53,16 +54,17 @@ function get_ranking_day($maestroID, $appID) {
global $db_conn;
$query = "
SELECT BR.PlayerID As PlayerID, P.Name AS Name, MAX(BR.BestRecord) AS BestRecord
FROM best_record BR, player P
WHERE BR.PlayerID = P.PlayerID AND DATE(BR.RecordDateTime) = DATE(NOW()) AND BR.MaestroID = ? AND BR.AppID = ?
GROUP BY BR.PlayerID
ORDER BY max(BR.BestRecord)
";
if(is_highest_record_prefer_app($appID))
$query = $query." DESC;";
else
$query = $query." ASC;";
if(is_highest_record_prefer_app($appID)) {
$query = "SELECT BR.PlayerID As PlayerID, P.Name AS Name, MAX(BR.BestRecord) AS BestRecord".$query;
$query = $query."ORDER BY max(BR.BestRecord) DESC;";
} else {
$query = "SELECT BR.PlayerID As PlayerID, P.Name AS Name, MIN(BR.BestRecord) AS BestRecord".$query;
$query = $query."ORDER BY min(BR.BestRecord) ASC;";
}
$stmt = $db_conn->prepare($query);
$stmt->bind_param('ii', $maestroID, $appID);
$stmt->execute();
@@ -82,16 +84,17 @@ function get_ranking_month($maestroID, $appID) {
global $db_conn;
$query = "
SELECT BR.PlayerID As PlayerID, P.Name AS Name, MAX(BR.BestRecord) AS BestRecord
FROM best_record BR, player P
WHERE BR.PlayerID = P.PlayerID AND MONTH(BR.RecordDateTime) = MONTH(NOW()) AND BR.MaestroID = ? AND BR.AppID = ?
GROUP BY BR.PlayerID
ORDER BY max(BR.BestRecord)
";
if(is_highest_record_prefer_app($appID))
$query = $query." DESC;";
else
$query = $query." ASC;";
if(is_highest_record_prefer_app($appID)) {
$query = "SELECT BR.PlayerID As PlayerID, P.Name AS Name, MAX(BR.BestRecord) AS BestRecord".$query;
$query = $query."ORDER BY max(BR.BestRecord) DESC;";
} else {
$query = "SELECT BR.PlayerID As PlayerID, P.Name AS Name, MIN(BR.BestRecord) AS BestRecord".$query;
$query = $query."ORDER BY min(BR.BestRecord) ASC;";
}
$stmt = $db_conn->prepare($query);
$stmt->bind_param('ii', $maestroID, $appID);
$stmt->execute();