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

This commit is contained in:
nicolasconnault
2008-02-05 10:38:44 +00:00
parent 93f56c2a9d
commit 502e8e4c30
+1 -1
View File
@@ -371,7 +371,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;