T201704211010
This commit is contained in:
@@ -24,11 +24,17 @@ if($cid == -1) {
|
|||||||
$data[] = array('place' => $place, 'name' => $name, 'score' => $score);
|
$data[] = array('place' => $place, 'name' => $name, 'score' => $score);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$overview = $db->query('SELECT u."name", COALESCE(h."score", -1) AS "score"
|
/*$overview = $db->query('SELECT u."name", COALESCE(h."score", -1) AS "score"
|
||||||
FROM "Users" u RIGHT OUTER JOIN "Highscores" h ON u."ID" = h."Users_ID"
|
FROM "Users" u RIGHT OUTER JOIN "Highscores" h ON u."ID" = h."Users_ID"
|
||||||
WHERE h."Categories_ID" = $1
|
WHERE h."Categories_ID" = $1
|
||||||
ORDER BY COALESCE(h."score", -1) DESC
|
ORDER BY COALESCE(h."score", -1) DESC
|
||||||
|
LIMIT $2 OFFSET $3', array($cid, $limit, $offset))['data'];*/
|
||||||
|
$overview = $db->query('SELECT u."name", h."score"
|
||||||
|
FROM "Users" u JOIN "Highscores" h ON u."ID" = h."Users_ID"
|
||||||
|
WHERE h."Categories_ID" = $1
|
||||||
|
ORDER BY h."score" DESC
|
||||||
LIMIT $2 OFFSET $3', array($cid, $limit, $offset))['data'];
|
LIMIT $2 OFFSET $3', array($cid, $limit, $offset))['data'];
|
||||||
|
print_r($overview);
|
||||||
foreach($overview as $row) {
|
foreach($overview as $row) {
|
||||||
$name = $row['name'];
|
$name = $row['name'];
|
||||||
$score = $row['score'];
|
$score = $row['score'];
|
||||||
|
|||||||
Reference in New Issue
Block a user