connect_errno) { echo "Failed to connect to MySQL: " . $mysqli->connect_error; die; } $CURRENT_VERSION = "1.0.1"; // Query highscore table $version = explode('.', $CURRENT_VERSION); //$statement = $mysqli->prepare("SELECT name, score, submit_time FROM highscores WHERE submitted=1 AND version_major=? AND version_minor=? ORDER BY score DESC LIMIT 50"); //$statement = $mysqli->prepare("SELECT name, MAX(score) as score, submit_time FROM highscores WHERE submitted=1 AND version_major=? AND version_minor=? GROUP BY name ORDER BY score DESC"); $statement = $mysqli->prepare("SELECT h1.name, h1.score, h1.submit_time FROM highscores h1 INNER JOIN (SELECT name, MAX(score) score FROM highscores WHERE submitted=1 AND version_major=? AND version_minor=? GROUP BY name) h2 ON h1.name = h2.name AND h1.score = h2.score ORDER BY h1.score DESC"); $statement->bind_param('ii', $version[0], $version[1]); function writeTable($statement) { echo("\n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); $statement->bind_result($name, $score, $submit_time); $success = $statement->execute(); if (!$success) { echo "Query failed: " . $mysqli->error; die; } $statement->store_result(); for ($position = 1; $statement->fetch(); $position++) { $formattedScore = number_format($score, 0, '.', ' '); $phpDate = strtotime($submit_time); $formattedDate = date('d.m.Y', $phpDate); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); echo(" \n"); } echo("
PositionNameScoreDate
" . $position . "." . $name . "" . $formattedScore . "" . $formattedDate . "
\n"); } ?> Demoscene Pinball Highscores

Demoscene Pinball - Highscores

Back to main page

This page is still under construction.

Player ranking

This page was last modified on