From 14b301849f80e0b09e0f89b12e0b5f0394748fc6 Mon Sep 17 00:00:00 2001 From: Ruben Date: Mon, 5 Sep 2016 12:12:58 +0100 Subject: [PATCH] Fix score position and percentage --- src/Models/GameRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Models/GameRepository.php b/src/Models/GameRepository.php index 5fb0e89..f81f9d9 100644 --- a/src/Models/GameRepository.php +++ b/src/Models/GameRepository.php @@ -8,7 +8,7 @@ class GameRepository extends EntityRepository { public function getPositionForGame(Game $game) { $query = $this->_em->createQuery( - "SELECT COUNT(g.id) FROM ". Game::class ." g WHERE g.score > :score AND g.level = :level" + "SELECT COUNT(g.id) + 1 FROM ". Game::class ." g WHERE g.score > :score AND g.level = :level" ) ->setParameters([ 'score' => $game->getScore(),