MDL-12158 Applied Matt's patch, merging from 1.9
This commit is contained in:
+1
-1
@@ -384,7 +384,7 @@ function count_records_select($table, $select='', $countitem='COUNT(*)') {
|
||||
function count_records_sql($sql) {
|
||||
$rs = get_recordset_sql($sql);
|
||||
|
||||
if ($rs) {
|
||||
if (is_object($rs) and is_array($rs->fields)) {
|
||||
return reset($rs->fields);
|
||||
} else {
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user