summaryrefslogtreecommitdiffstats
path: root/system/database/DB_result.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/database/DB_result.php')
-rw-r--r--system/database/DB_result.php6
1 files changed, 3 insertions, 3 deletions
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();
}