Changeset 2243

Show
Ignore:
Timestamp:
03/08/2008 08:24:07 PM (10 months ago)
Author:
Shadowhand
Message:

Running Database::clear_cache() when Database::insert() is run. This should prevent duplicate insert errors that can happen when inserting several related rows into a database.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Database.php

    r2216 r2243  
    810810                } 
    811811 
     812                // Clear the database cache, if caching is enabled 
     813                ($this->config['cache'] === TRUE) and $this->clear_cache(); 
     814 
    812815                $sql = $this->driver->insert($this->config['table_prefix'].$table, array_keys($this->set), array_values($this->set)); 
    813816