mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-24 05:38:06 +03:00
Fixed error when using postgres in a SELECT count query where a ORDER BY was added by mistake
This commit is contained in:
parent
425f254453
commit
0f81c3ab92
1 changed files with 3 additions and 3 deletions
|
@ -50,7 +50,8 @@ DQL;
|
|||
?int $offset = null
|
||||
): array {
|
||||
$qb = $this->createVisitsByShortCodeQueryBuilder($shortCode, $dateRange);
|
||||
$qb->select('v');
|
||||
$qb->select('v')
|
||||
->orderBy('v.date', 'DESC');
|
||||
|
||||
if ($limit !== null) {
|
||||
$qb->setMaxResults($limit);
|
||||
|
@ -76,8 +77,7 @@ DQL;
|
|||
$qb->from(Visit::class, 'v')
|
||||
->join('v.shortUrl', 'su')
|
||||
->where($qb->expr()->eq('su.shortCode', ':shortCode'))
|
||||
->setParameter('shortCode', $shortCode)
|
||||
->orderBy('v.date', 'DESC') ;
|
||||
->setParameter('shortCode', $shortCode);
|
||||
|
||||
// Apply date range filtering
|
||||
if ($dateRange !== null && $dateRange->getStartDate() !== null) {
|
||||
|
|
Loading…
Reference in a new issue