Doctrine DBAL
  1. Doctrine DBAL
  2. DBAL-788

ORDER BY with function COUNT() fails

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: Platforms
    • Security Level: All
    • Labels:
      None
    • Environment:
      mssql 2008 R2

      Description

      This:
      ORDER BY ad.name ASC, count(filter.value) DESC

      Fails with:
      Error: Expected end of string, got '('

        Issue Links

          Activity

          Hide
          Steve Müller added a comment -

          M.K. Thank you for investigating. I would like to move this ticket to DBAL because it is a DBAL issue. But I guess that makes two issues now because if I understand correctly, Flip did not use a limit/offset query modification but did not use an alias in the ORDER BY clause either but instead directly specified a COUNT() expression...

          Show
          Steve Müller added a comment - M.K. Thank you for investigating. I would like to move this ticket to DBAL because it is a DBAL issue. But I guess that makes two issues now because if I understand correctly, Flip did not use a limit/offset query modification but did not use an alias in the ORDER BY clause either but instead directly specified a COUNT() expression...
          Hide
          Flip added a comment -

          I can confirm it works when using an alias. Issue can be closed.

          Show
          Flip added a comment - I can confirm it works when using an alias. Issue can be closed.
          Hide
          M.K. added a comment -

          This issue refers to the same problem:
          http://www.doctrine-project.org/jira/browse/DBAL-834

          Show
          M.K. added a comment - This issue refers to the same problem: http://www.doctrine-project.org/jira/browse/DBAL-834
          Hide
          Doctrine Bot added a comment -

          A related Github Pull-Request [GH-573] was closed:
          https://github.com/doctrine/dbal/pull/573

          Show
          Doctrine Bot added a comment - A related Github Pull-Request [GH-573] was closed: https://github.com/doctrine/dbal/pull/573
          Show
          Steve Müller added a comment - Fixed in commit: https://github.com/doctrine/dbal/commit/4a7ff71ec3b57af7d70f1180897502f8a156d59b

            People

            • Assignee:
              Steve Müller
              Reporter:
              Flip
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: