From d822f2a37333fb7d6a8a654d540eb506ad956f51 Mon Sep 17 00:00:00 2001 From: rMalie Date: Thu, 28 Jul 2011 13:51:29 +0000 Subject: [PATCH] // Fix #PSFV-32 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7787 b9a71923-0436-4b27-9f14-aed3839534dd --- 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;