From 69bc06bbee9697b48c018d04b650528720b8a4aa Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Thu, 20 Jun 2013 14:42:58 +0800 Subject: [PATCH] Adjusted query so that it works in MySQL --- lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib.php b/lib.php index 44530be..b9144c0 100644 --- a/lib.php +++ b/lib.php @@ -692,7 +692,7 @@ function customcert_get_number_of_issues($customcertid, $cm, $groupmode) { $allparams = $conditionsparams + array('customcertid' => $customcertid); // Return the number of issues. - return $DB->count_records_sql("SELECT COUNT(u.*) as count + return $DB->count_records_sql("SELECT COUNT(u.id) as count FROM {user} u INNER JOIN {customcert_issues} ci ON u.id = ci.userid