diff options
author | Purwandi <free6300@gmail.com> | 2012-01-09 10:33:28 +0100 |
---|---|---|
committer | Purwandi <free6300@gmail.com> | 2012-01-09 10:33:28 +0100 |
commit | 1d160e78619574bf7fcb3c9b5d6a4bc9f93f2db6 (patch) | |
tree | 5522daf906d4bddf193012db07b0834124f19d73 /system | |
parent | 2425f2f90331a014d3b276629089135fbd849a42 (diff) |
Fix error undefined variable query on count_all_results db active record
Diffstat (limited to 'system')
-rw-r--r-- | system/database/DB_active_rec.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 71762a4de..424735157 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -1127,15 +1127,14 @@ class CI_DB_active_record extends CI_DB_driver { $result = $this->query($this->_compile_select($this->_count_string.$this->_protect_identifiers('numrows'))); $this->_reset_select(); - if ($query->num_rows() === 0) + if ($result->num_rows() === 0) { return 0; } - $row = $query->row(); + $row = $result->row(); return (int) $row->numrows; } - // -------------------------------------------------------------------- /** |