From 849ecdefeb2dab583669bd5b79e8f2a18906c95e Mon Sep 17 00:00:00 2001 From: Rick Ellis Date: Sat, 18 Oct 2008 06:47:53 +0000 Subject: Added AR caching features to update and delete functions --- system/database/DB_active_rec.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 0f5d2b226..e3798254c 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -1098,7 +1098,7 @@ class CI_DB_active_record extends CI_DB_driver { * @return object */ function insert($table = '', $set = NULL) - { + { if ( ! is_null($set)) { $this->set($set); @@ -1148,6 +1148,9 @@ class CI_DB_active_record extends CI_DB_driver { */ function update($table = '', $set = NULL, $where = NULL, $limit = NULL) { + // Combine any cached components with the current statements + $this->_merge_cache(); + if ( ! is_null($set)) { $this->set($set); @@ -1286,6 +1289,9 @@ class CI_DB_active_record extends CI_DB_driver { */ function delete($table = '', $where = '', $limit = NULL, $reset_data = TRUE) { + // Combine any cached components with the current statements + $this->_merge_cache(); + if ($table == '') { if ( ! isset($this->ar_from[0])) -- cgit v1.2.3-24-g4f1b