summaryrefslogtreecommitdiffstats
path: root/system/database/DB_result.php
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-25 07:12:34 +0200
committeradmin <devnull@localhost>2006-10-25 07:12:34 +0200
commit1716cb80344dcb09dd263293b7901cd5b669e302 (patch)
tree544c6f45fe307cdd2a1d0f6a5f2bc05f0bceca49 /system/database/DB_result.php
parent2bc13859b72ceb8400d37adbba52b8404995bf03 (diff)
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();
}