MDL-12158 Applied Matt's patch, merging from 1.6

This commit is contained in:
nicolasconnault
2008-02-05 10:38:32 +00:00
parent 84620a0041
commit 85ca3686cb
+1 -1
View File
@@ -353,7 +353,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;