Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-11188

postgres search result count does not get the total count

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.1.0-a1
    • 3.1.0-dev
    • Search
    • None

      // if the total result count is not cached yet, retrieve it from the db
      if (!$result_count)
      {
      $result_count = sizeof ($id_ary);
      This doesn't take into account the results that are outside the Limit and offset of the query.
      Mysql uses FOUND_ROWS() function instead of sizeof($id_ary). Since pgsql doesn't have FOUND_ROWS, only possible solution is to use a COUNT function to calculate the total result count so that it can be cached.

            Oleg Oleg [X] (Inactive)
            dhruv.goel92 Dhruv Goel [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: