From 31eeb0587cd5fcef8209ca5083f28a39435c135d Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 20 Oct 2006 05:11:33 +0000 Subject: --- system/database/DB_result.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'system/database') diff --git a/system/database/DB_result.php b/system/database/DB_result.php index b163bb5ea..4e8c4fc76 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -63,6 +63,11 @@ class CI_DB_result { return $this->result_object; } + if ($this->num_rows == 0) + { + return array(); + } + $this->_data_seek(0); while ($row = $this->_fetch_object()) { @@ -87,6 +92,11 @@ class CI_DB_result { return $this->result_array; } + if ($this->num_rows == 0) + { + return array(); + } + $this->_data_seek(0); while ($row = $this->_fetch_assoc()) { -- cgit v1.2.3-24-g4f1b