Add: pass appID to start.html

This commit is contained in:
2018-05-29 17:57:48 +09:00
parent 72ea114cc8
commit 34296567d0
5 changed files with 15 additions and 3 deletions
+3 -2
View File
@@ -25,15 +25,16 @@ function get_active_app_list($maestro_id) {
$return_array = array();
$query = "
SELECT A.AppName, A.AppType
SELECT A.AppID, A.AppName, A.AppType
FROM moty_app AS A
INNER JOIN moty_active_app AS AA ON A.AppID = AA.AppID AND AA.MaestroID=?";
$stmt = $db_conn->prepare($query);
$stmt->bind_param('i', $maestro_id);
$stmt->execute();
$stmt->bind_result($app_name, $app_type);
$stmt->bind_result($app_id, $app_name, $app_type);
while($stmt->fetch()) {
$row_array['AppID'] = $app_id;
$row_array['AppName'] = $app_name;
$row_array['AppType'] = $app_type;
array_push($return_array, $row_array);
+1 -1
View File
@@ -12,7 +12,7 @@ include "./../setup/connect_db.php";
// my ranking
$query = "
SELECT DATE(DateTime) AS Date, MAX(Score) AS HighScore, AppName AS AppName
SELECT DATE(RecordDateTime) AS Date, MAX(BestRecord) AS HighScore, AppName AS AppName
FROM moty_record D
WHERE UserID = ? AND DATE(D.DateTime) < DATE(?) AND AppName = ?
GROUP BY DATE(DateTime)