Reputation: 11
I have the error below
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]
Has anyone a similar problem..., when new users create an account can't add products in the basket.
Upvotes: 0
Views: 1279