← Back to team overview

mahara-contributors team mailing list archive

[Bug 1644649] A change has been merged

 

Reviewed:  https://reviews.mahara.org/7270
Committed: https://git.mahara.org/mahara/mahara/commit/57ca7c4130daaa3b821da4c3dc681d0f79886536
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch:    master

commit 57ca7c4130daaa3b821da4c3dc681d0f79886536
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date:   Fri Nov 25 10:58:04 2016 +1300

Bug 1644649: getting count_recordset_sql() to throw error

If no actual 'COUNT()' in string and the sql query return no rows

behatnotneeded

Change-Id: I8d86cd0dda889c564d89e494c586a98e9425fc3e
Signed-off-by: Robert Lyon <robertl@xxxxxxxxxxxxxxx>

-- 
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:
  In Progress
Status in Mahara 16.10 series:
  In Progress
Status in Mahara 17.04 series:
  In Progress

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