From 708742042dab8378bee8e6a351337782f3e390ea Mon Sep 17 00:00:00 2001 From: rMalie Date: Thu, 28 Jul 2011 13:51:29 +0000 Subject: [PATCH] // Fix #PSFV-32 --- classes/Db.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classes/Db.php b/classes/Db.php index ad7b9171e..a1239dd2a 100644 --- a/classes/Db.php +++ b/classes/Db.php @@ -298,7 +298,8 @@ abstract class DbCore public function delete($table, $where = false, $limit = false, $use_cache = 1) { $this->_result = false; - $res = $this->query('DELETE FROM `'.pSQL($table).'`'.($where ? ' WHERE '.$where : '').($limit ? ' LIMIT '.(int)$limit : '')); + $sql = 'DELETE FROM `'.pSQL($table).'`'.($where ? ' WHERE '.$where : '').($limit ? ' LIMIT '.(int)$limit : ''); + $res = $this->query($sql); if ($use_cache AND _PS_CACHE_ENABLED_) Cache::getInstance()->deleteQuery($sql); return $res;