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

This commit is contained in:
nicolasconnault
2008-02-05 10:39:56 +00:00
parent b6fc06b6a4
commit 2c1bfda65e
+1 -1
View File
@@ -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;