implement pagination

This commit is contained in:
ghost 2024-01-18 07:47:53 +02:00
parent 79d70e4a9d
commit bb5eec002d
4 changed files with 141 additions and 23 deletions

View file

@ -20,4 +20,17 @@ class OnlineRepository extends ServiceEntityRepository
{
parent::__construct($registry, Online::class);
}
public function getTotalByCrc32server(
int $crc32server
): int
{
return $this->createQueryBuilder('o')
->select('count(o.id)')
->where('o.crc32server = :crc32server')
->setParameter('crc32server', $crc32server)
->getQuery()
->getSingleScalarResult()
;
}
}