summaryrefslogtreecommitdiffstats
path: root/system/database/DB_active_rec.php
diff options
context:
space:
mode:
authorRick Ellis <rick.ellis@ellislab.com>2008-10-18 08:47:53 +0200
committerRick Ellis <rick.ellis@ellislab.com>2008-10-18 08:47:53 +0200
commit849ecdefeb2dab583669bd5b79e8f2a18906c95e (patch)
tree8cb0dac499ff8646c136c68a846b9e4d5e51e38c /system/database/DB_active_rec.php
parentd9f73db2b4e234bd10499ac060996ece3713d74b (diff)
Added AR caching features to update and delete functions
Diffstat (limited to 'system/database/DB_active_rec.php')
-rw-r--r--system/database/DB_active_rec.php8
1 files changed, 7 insertions, 1 deletions
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]))