mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #40085
[Bug 1644649] Re: Bad call to count_records_sql() for collection views
** Changed in: mahara/16.10
Status: In Progress => Fix Committed
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1644649
Title:
Bad call to count_records_sql() for collection views
Status in Mahara:
Fix Committed
Status in Mahara 16.10 series:
Fix Committed
Status in Mahara 17.04 series:
Fix Committed
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1644649/+subscriptions
References