我无法从 BO 访问承运人、库存和仓库,它抛出了这种错误,我不明白这个错误是怎么回事。请指导我,因为我对 prestashop 很陌生。请参阅下面的图片链接以查看错误:
[PrestaShopDatabaseException] 您的 SQL 语法有错误;检查与您的 MySQL 服务器版本相对应的手册,以在第 2 行的 ')' 附近使用正确的语法
选择 * 从ps_hook_module_exceptions
哪里id_shop
()
在文件 classes/db/Db.php 的第 791 行
- if ($webservice_call && $errno) {
- $dbg = debug_backtrace();
- WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[ 3]['class'] : '').'->'.$dbg[3]['function'].'() 查询为 : '.$sql, 97);
- } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
- 如果($sql){
- 抛出新的 PrestaShopDatabaseException($this->getMsgError()。'
'.$sql.'
'); - }
- 抛出新的 PrestaShopDatabaseException($this->getMsgError());
- }
- }
DbCore->displayError - [第 425 行 - classes/db/Db.php] - [1 参数]
- $this->result = $this->_query($sql);
- }
- }
- 如果(_PS_DEBUG_SQL_){
- $this->displayError($sql);
- }
- 返回$this->结果;
- } 430。
论据 [0]
选择 * 从ps_hook_module_exceptions
哪里id_shop
()
DbCore->query - [第 643 行 - classes/db/Db.php] - [1 参数]
- throw new PrestaShopDatabaseException('Db->executeS() 只能用于选择、显示、解释或描述查询');
- }
- 返回 $this->execute($sql, $use_cache);
- }
- $this->result = $this->query($sql);
- if (!$this->result) {
- $结果=假;
- } 别的 {
- if (!$array) { 参数 [0]
选择 * 从ps_hook_module_exceptions
哪里id_shop
()
DbCore->executeS - [第 2142 行 - 类/模块/Module.php] - [2 个参数]
- if (!Cache::isStored($cache_id)) {
- $exceptions_cache = 数组();
- $sql = '选择 * 从
'._DB_PREFIX_.'hook_module_exceptions
- WHERE
id_shop
IN ('.implode(', ', Shop::getContextListShopID()).')'; - $db = Db::getInstance();
- $result = $db->executeS($sql, false);
- 而 ($row = $db->nextRow($result)) {
- if (!$row['file_name']) {
- 继续;
- }
- $key = $row['id_hook'].'-'.$row['id_module'];
论据 [0]
SELECT * FROM ps_hook_module_exceptions
WHERE id_shop
IN () 参数1
ModuleCore::getExceptionsStatic - [line 495 - classes/Hook.php] - [2 Arguments] 490. 继续;491. } 492. 493. // 检查权限 494. if ($check_exceptions) { 495. $exceptions = Module::getExceptionsStatic($array['id_module'], $array['id_hook']); 496. 497. $controller = Dispatcher::getInstance()->getController(); 498. $controller_obj = 上下文::getContext()->控制器;499. 500. //检查当前控制器是否为模块控制器 Argument [0] 63 Argument 1 57
HookCore::exec - [第 2749 行 - 类/控制器/AdminController.php] - [2 个参数]
- 'host_mode' => 已定义('_PS_HOST_MODE_')?1 : 0,
- 'stock_management' => (int)Configuration::get('PS_STOCK_MANAGEMENT')
- ));
- if ($this->display_header) {
- $this->context->smarty->assign('displayBackOfficeHeader', Hook::exec('displayBackOfficeHeader', array()));
- }
- $this->context->smarty->assign(array(
- 'displayBackOfficeTop' => Hook::exec('displayBackOfficeTop', array()),
- 'submit_form_ajax' => (int)Tools::getValue('submitFormAjax') 参数 [0] displayBackOfficeHeader 参数1 数组 ()
AdminControllerCore->init - [第 170 行 - 类/控制器/Controller.php]
- /**
- 启动控制器进程(此方法不应被覆盖!)
- */
- 公共函数运行()
- {
- $this->init();
- if ($this->checkAccess()) {
- // setMedia 必须在 postProcess 之前调用
- if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
- $this->setMedia();
- }
ControllerCore->运行 - [第 367 行 - 类/Dispatcher.php]
- 如果(isset($params_hook_action_dispatcher)){
- 钩子::exec('actionDispatcher', $params_hook_action_dispatcher);
- }
- // 运行控制器
- $控制器->运行();
- } 捕捉(PrestaShopException $e){
- $e->displayMessage();
- }
- } 372.
DispatcherCore->dispatch - [第 58 行 - admin/index.php]
- if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) {
- $_REQUEST['controller'] = strtolower($_REQUEST['tab']);
- }
- // 准备并触发管理调度程序
- Dispatcher::getInstance()->dispatch();