jouymj Posted February 6, 2015 Share Posted February 6, 2015 (edited) [PrestaShopDatabaseException] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND TO_DAYS(NOW()) - TO_DAYS(sm.`date_add`) <= 7 AND s.`id_product` = 318 ' at line 14. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND TO_DAYS(NOW()) - TO_DAYS(sm.`date_add`) <= 7 AND s.`id_product` = 1429 ' at line 14 SELECT SUM(view.quantity) as quantity_out FROM ( SELECT sm.`physical_quantity` as quantity FROM `pt_stock_mvt` sm LEFT JOIN `pt_stock` s ON (sm.`id_stock` = s.`id_stock`) LEFT JOIN `pt_product` p ON (p.`id_product` = s.`id_product`) INNER JOIN pt_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN `pt_product_attribute` pa ON (p.`id_product` = pa.`id_product`) LEFT JOIN pt_product_attribute_shop product_attribute_shop ON (product_attribute_shop.id_product_attribute = pa.id_product_attribute AND product_attribute_shop.id_shop = 1) WHERE sm.`sign` = -1 AND sm.`id_stock_mvt_reason` != AND TO_DAYS(NOW()) - TO_DAYS(sm.`date_add`) <= 7 AND s.`id_product` = 1429 AND s.`id_product_attribute` = 0 AND s.`id_warehouse` = 2 GROUP BY sm.`id_stock_mvt` ) as view LIMIT 1at line 635 in file classes/db/Db.php 629. WebserviceRequest::getInstance()->setError(500, ' '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);630. }631. else if (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))632. {633. if ($sql)634. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');635. throw new PrestaShopDatabaseException($this->getMsgError());636. }637. }638.639. /** DbCore->displayError - [line 325 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 547 - classes/db/Db.php] - [1 Arguments] DbCore->getRow - [line 572 - classes/db/Db.php] - [2 Arguments] DbCore->getValue - [line 611 - classes/stock/StockManager.php] - [1 Arguments] StockManagerCore->getProductCoverage - [line 577 - modules/mailalerts/mailalerts.php] - [4 Arguments] MailAlerts->hookActionProductCoverage - [line 507 - classes/Hook.php] - [1 Arguments] HookCore::exec - [line 416 - classes/stock/StockManager.php] - [2 Arguments] StockManagerCore->removeProduct - [line 218 - classes/order/OrderHistory.php] - [7 Arguments] OrderHistoryCore->changeIdOrderState - [line 491 - controllers/admin/AdminOrdersController.php] - [3 Arguments] AdminOrdersControllerCore->postProcess - [line 171 - classes/controller/Controller.php] ControllerCore->run - [line 130 - override/classes/controller/Controller.php] Controller->run - [line 373 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 54 - admin/index.php] Hola, me sale este error de manera muy habitual cuando quiero cambiar el estado de un producto a enviado, salgo y vuelvo a entrar y ya me deja. El mismo error sale cuando quiero acceder a cobertura de existencias, pero ese me da siempre, no consigo entrar en ese apartado. Alguna sugerencia?? Gracias Edited February 6, 2015 by jouymj (see edit history) Link to comment Share on other sites More sharing options...
jouymj Posted February 11, 2015 Author Share Posted February 11, 2015 Hola, nadie tiene este problema??. Gracias Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now