// Fix Db::executeS() now trigger Db::execute() method if the query begin with select|show|explain keyword

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10025 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-11-10 09:59:39 +00:00
parent 9be2c0c705
commit 4c6e936967
+5 -1
View File
@@ -401,7 +401,11 @@ abstract class DbCore
// This methode must be used only with queries which display results
if (!preg_match('#^\s*(select|show|explain)\s#i', $sql))
throw new PrestashopDatabaseException('Db->executeS() must be used only with select, show or explain queries');
{
if (_PS_MODE_DEV_)
throw new PrestashopDatabaseException('Db->executeS() must be used only with select, show or explain queries');
return $this->execute($sql, $use_cache);
}
$this->result = false;
$this->last_query = $sql;