summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-22 05:13:22 +0200
committeradmin <devnull@localhost>2006-10-22 05:13:22 +0200
commit7591faf97bc152e385a154ffdf3c6a75d6b74bc9 (patch)
treeaf25f4940057a5dae53e545f7523e8a3d08a3388 /system
parent36e644241623461d6ac9531bdc5a61ee40b28be4 (diff)
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_result.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index 7553c167f..5c8b4c3ae 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -63,11 +63,14 @@ class CI_DB_result {
return $this->result_object;
}
- if ($this->num_rows == 0)
+ // 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)
{
return array();
}
-
+
$this->_data_seek(0);
while ($row = $this->_fetch_object())
{
@@ -92,7 +95,10 @@ class CI_DB_result {
return $this->result_array;
}
- if ($this->num_rows == 0)
+ // 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)
{
return array();
}