From 7c9bd9e8e8c4d2e57c4f08f526e5464236fa90e3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 25 Nov 2009 13:59:01 -0800 Subject: Call execute() after upate() and insert(). --- modules/gallery/libraries/drivers/Cache/Database.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'modules/gallery/libraries/drivers/Cache/Database.php') diff --git a/modules/gallery/libraries/drivers/Cache/Database.php b/modules/gallery/libraries/drivers/Cache/Database.php index d27bcc32..eda445b6 100644 --- a/modules/gallery/libraries/drivers/Cache/Database.php +++ b/modules/gallery/libraries/drivers/Cache/Database.php @@ -64,11 +64,14 @@ class Cache_Database_Driver extends Cache_Driver { $status = db::build()->update( "caches", array("tags" => $tags, "expiration" => $lifetime, "cache" => serialize($data)), - array("key", "=", $id)); + array("key", "=", $id)) + ->execute(); } else { $status = db::build()->insert( "caches", - array("key" => $id, "tags" => $tags, "expiration" => $lifetime, "cache" => serialize($data))); + array("key" => $id, "tags" => $tags, + "expiration" => $lifetime, "cache" => serialize($data))) + ->execute(); } } @@ -185,6 +188,6 @@ class Cache_Database_Driver extends Cache_Driver { * Empty the cache */ public function delete_all() { - db::build()->query("TRUNCATE {caches}"); + db::build()->query("TRUNCATE {caches}")->execute(); } } \ No newline at end of file -- cgit v1.2.3