Adjusted query so that it works in MySQL

This commit is contained in:
Mark Nelson 2013-06-20 14:42:58 +08:00
parent b3a767d151
commit 69bc06bbee

View file

@ -692,7 +692,7 @@ function customcert_get_number_of_issues($customcertid, $cm, $groupmode) {
$allparams = $conditionsparams + array('customcertid' => $customcertid); $allparams = $conditionsparams + array('customcertid' => $customcertid);
// Return the number of issues. // 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 FROM {user} u
INNER JOIN {customcert_issues} ci INNER JOIN {customcert_issues} ci
ON u.id = ci.userid ON u.id = ci.userid