From 1716cb80344dcb09dd263293b7901cd5b669e302 Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 25 Oct 2006 05:12:34 +0000 Subject: --- system/database/DB_result.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/database/DB_result.php') diff --git a/system/database/DB_result.php b/system/database/DB_result.php index 5c8b4c3ae..9784561d4 100644 --- a/system/database/DB_result.php +++ b/system/database/DB_result.php @@ -66,11 +66,11 @@ class CI_DB_result { // In the event that query caching is on the result_id variable // will return FALSE since there isn't a valid SQL resource so // we'll simply return an empty array. - if ($this->result_id === FALSE) + if ($this->result_id === FALSE OR $this->num_rows() == 0) { return array(); } - + $this->_data_seek(0); while ($row = $this->_fetch_object()) { @@ -98,7 +98,7 @@ class CI_DB_result { // In the event that query caching is on the result_id variable // will return FALSE since there isn't a valid SQL resource so // we'll simply return an empty array. - if ($this->result_id === FALSE) + if ($this->result_id === FALSE OR $this->num_rows() == 0) { return array(); } -- cgit v1.2.3-24-g4f1b