";
$table .= "
" . $result['title'] . " | ";
$table .= "" . $result['difficulty'] . " | ";
$table .= "" . $result['username'] . " | ";
$table .= "" . $result['score'] . " | ";
$table .= "" . $result['date'] . " | ";
$table .= "";
}
// ======================================================
// DATA POINTS FOR SCORES GRAPH
// ======================================================
$scores_array = array();
$scores_names_array = array();
$query = "SELECT `date`, `score`, `username`
FROM highscore
ORDER BY `date` DESC
LIMIT 0,28";
$result_temp = mysqli_query($connection, $query);
while($result = mysqli_fetch_assoc($result_temp))
{
$scores_array[] = "{y: '" . $result['date'] . "', sc: " . $result['score'] . "}";
$scores_names_array[] = "'" . $result['username'] . "'";
}
$scores_array = array_reverse($scores_array);
$scores_names_array = array_reverse($scores_names_array);
// ======================================================
// SELECT HIGHEST SCORE OF TODAY
// ======================================================
$query = "SELECT `username`, `score`
FROM highscore
ORDER BY `score` DESC
LIMIT 1";
$result_temp = mysqli_query($connection, $query);
$result = mysqli_fetch_assoc($result_temp);
$highest_score = $result['score'];
$best_player = $result['username'];
if($highest_score==null)
{
$highest_score=0;
$best_player="BORF";
}
?>
| Song Name |
Difficulty |
Name |
Score |
Time |