Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-8569

Sorting by numerical field does not work with PostgreSQL 8.1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.7
    • 1.6.4
    • None
    • PostgreSQL 8.1
    • PostgreSQL
    • MOODLE_16_STABLE
    • MOODLE_17_STABLE

      No records found when I change the view to sort records by a numerical field. I am getting this erro in the postgresql logfile:
      ===========
      2007-02-19 12:09:12 CET moodle_cz SELECTERROR: for SELECT DISTINCT, ORDER BY expressions must appear in select list
      2007-02-19 12:09:12 CET moodle_cz SELECTSTATEMENT: SELECT DISTINCT r.id, r.approved, r.userid, u.firstname, u.lastname, c.content FROM mdl_data_content c,mdl_data_records r,mdl_data_content c1, mdl_user u WHERE c.recordid = r.id
      AND c.fieldid = 31
      AND r.dataid = 10
      AND r.userid = u.id
      AND c1.recordid = r.id ORDER BY CAST(c.content AS REAL) ASC , r.id ASC LIMIT 10 OFFSET 0
      ===========

      Maybe ORDER BY CAST(c.content AS REAL) causes this error?

            dougiamas Martin Dougiamas
            mudrd8mz David Mudrák (@mudrd8mz)
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.