2013-10-06 48 views
0

我在每個類別頁面上出現錯誤。就像我點擊主頁上的任何產品,顯示下面的錯誤。任何產品。請幫助某人謝謝。prestashop每個頁面上的錯誤然後主頁


[PrestaShopDatabaseException]

Db->executeS() must be used only with select, show, explain or describe queries 
at line 470 in file classes/db/Db.php 

464.   //print_r($sql);exit; 
465.  // This method must be used only with queries which display results 
466.  if (!preg_match('#^\s*\(?\s*(select|show|explain|describe|desc)\s#i', $sql)) 
467.  { 
468.   if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_) 
469.    throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries'); 
470.   return $this->execute($sql, $use_cache); 
471.  } 
472. 
473.  $this->result = false; 
474.  $this->last_query = $sql; 
DbCore->executeS - [line 130 - modules/blockviewed/blockviewed.php] - [1 Arguments] 
BlockViewed->hookRightColumn - [line 192 - modules/blockviewed/blockviewed.php] - [1 Arguments] 
BlockViewed->hookLeftColumn - [line 423 - classes/Hook.php] - [1 Arguments] 
HookCore::exec - [line 427 - classes/controller/FrontController.php] - [1 Arguments] 
FrontControllerCore->initContent - [line 84 - override/classes/controller/FrontController.php] - [0 Argument] 
FrontController->initContent - [line 173 - controllers/front/ProductController.php] - [0 Argument] 
ProductControllerCore->initContent - [line 7 - override/controllers/front/ProductController.php] - [0 Argument] 
ProductController->initContent - [line 167 - classes/controller/Controller.php] - [0 Argument] 
ControllerCore->run - [line 349 - classes/Dispatcher.php] - [0 Argument] 
DispatcherCore->dispatch - [line 28 - index.php] - [0 Argument] 

感謝, AJ!

+0

好了,小心解釋一下,如果你修改了classes/db/Db.php?你正在做一個全新的安裝,你的安裝失敗?你有哪個版本? – eis

回答

0

錯誤發生在第130行的modules/blockviewed/blockviewed.php中。你在一個不是SELECT的查詢上使用executeS函數。檢查第130行的文件並共享代碼,以便我可以看到代碼。

謝謝