From af6f34489a9dc6b22cc9fe02eb53e13014ced38f Mon Sep 17 00:00:00 2001
From: Phil Sturgeon
Date: Tue, 22 Mar 2011 19:12:23 +0000
Subject: ->db->count_all_results() will now return an integer instead of a
string.
---
system/database/DB_active_rec.php | 4 ++--
user_guide/changelog.html | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index ee72dbbf4..db8471364 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -1020,11 +1020,11 @@ class CI_DB_active_record extends CI_DB_driver {
if ($query->num_rows() == 0)
{
- return '0';
+ return 0;
}
$row = $query->row();
- return $row->numrows;
+ return (int) $row->numrows;
}
// --------------------------------------------------------------------
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 008cbb7c2..bf86172d7 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -71,6 +71,11 @@ Hg Tag: n/a
Added Environment Support for Hooks.
+ Database
+
+ - $this->db->count_all_results() will now return an integer instead of a string.
+
+
Bug fixes for 2.0.2
--
cgit v1.2.3-24-g4f1b