-
Bug
-
Resolution: Fixed
-
Critical
-
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?