summaryrefslogtreecommitdiffstats
path: root/system/database
diff options
context:
space:
mode:
Diffstat (limited to 'system/database')
-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]))