prestashop-1.7 - 类/db/Db.php 中的 Prestashop 错误错误
问题描述
我有以下错误
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-12' at line 8<pre>SELECT cp.`id_product` FROM `devapp_product` p INNER JOIN devapp_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN `devapp_category_product` cp ON p.`id_product` = cp.`id_product` WHERE cp.`id_category` = 10 AND product_shop.`visibility` IN ("both", "catalog") ORDER BY p.date_add DESC LIMIT -12</pre>
at line 770 in file classes/db/Db.php
765. $dbg = debug_backtrace();
766. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97);
767. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
768. if ($sql) {
769. // throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>');
770. throw new PrestaShopDatabaseException($this->getMsgError() . '<pre>' . $sql . '</pre>');
771. }
772.
773. throw new PrestaShopDatabaseException($this->getMsgError());
774. }
775. }
----------
DbCore->displayError - [line 385 - classes/db/Db.php] - [1 Arguments]
DbCore->query - [line 613 - classes/db/Db.php] - [1 Arguments]
DbCore->executeS - [line 260 - modules/strelatedproducts/strelatedproducts.php] - [1 Arguments]
StRelatedProducts->getProducts - [line 528 - modules/stthemeeditor/classes/BaseProductsSlider.php] - [1 Arguments]
BaseProductsSlider->_prepareHook - [line 648 - modules/stthemeeditor/classes/BaseProductsSlider.php] - [1 Arguments]
BaseProductsSlider->hookDisplayLeftColumn - [line 326 - modules/strelatedproducts/strelatedproducts.php] - [2 Arguments]
有没有人有类似的问题...,当新用户创建帐户时无法在购物篮中添加产品。
解决方案
推荐阅读
- swift - 为什么显示此警告:不支持的配置:直接从视图控制器启动的 Segue 必须具有标识符
- spring-boot - 如何对 3 个具有唯一约束及其关系的实体进行建模?
- angular - 如何获取模板中标签属性的值
- symfony - 在 Symfony 的 YAML 集合类型中混合数字键和字符串键
- java - 每次按下按钮时呈现颜色(lambda 表达式)
- android - 使用 AIDL 并将响应返回到另一个应用程序
- silverlight - 如何在 silverlight 中使用证书的私钥对数据进行签名
- html - 自定义 OpenType / TrueType 字体不起作用且难以调试
- php - JWT 无效签名 - PHP
- coq - Coq 证明涉及实数文字的算术表达式是相等的