diff options
author | admin <devnull@localhost> | 2006-10-25 07:12:34 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-10-25 07:12:34 +0200 |
commit | 1716cb80344dcb09dd263293b7901cd5b669e302 (patch) | |
tree | 544c6f45fe307cdd2a1d0f6a5f2bc05f0bceca49 /system/database/DB_result.php | |
parent | 2bc13859b72ceb8400d37adbba52b8404995bf03 (diff) |
Diffstat (limited to 'system/database/DB_result.php')
-rw-r--r-- | system/database/DB_result.php | 6 |
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(); } |