Bad call to count_records_sql() for collection views
Bug #1644649 reported by
Robert Lyon
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Medium
|
Robert Lyon | ||
16.10 |
Fix Released
|
Medium
|
Unassigned | ||
17.04 |
Fix Released
|
Medium
|
Robert Lyon |
Bug Description
In Mahara we have a db call called count_records_sql() that uses a passed in sql query.
It fetches a result set via get_recordset_sql() then calls reset() which fails if the result set is false.
Normally we use count_records_sql() with a query containing the sql COUNT() option so that it always returns a non false result.
But this is not obvious when using this function.
So I'll fix up the bad call to this function and put some notes in it about needing to use COUNT() in sql query string
Changed in mahara: | |
assignee: | nobody → Robert Lyon (robertl-9) |
To post a comment you must log in.
Patch for "master" branch: https:/ /reviews. mahara. org/7270