diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-01-09 14:49:51 +0100 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2012-01-09 14:49:51 +0100 |
commit | e9a5a862a1252548b463aa738e50e8d9bfd01379 (patch) | |
tree | f0aafcb6ff7d6c5e5f43923f37741aead3d51bcc | |
parent | 90dc964b9a06dce4f6e4f1d72d798672e1398cf9 (diff) | |
parent | 1d160e78619574bf7fcb3c9b5d6a4bc9f93f2db6 (diff) |
Merge pull request #903 from purwandi/database
Fix error undefined variable query on count_all_results db active record
-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; } - // -------------------------------------------------------------------- /** |