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 date_from < now() and date_to > now() and active=1 and quantity > quan' at line 5<br /><br /><pre>Select id_cart_rule, date_format(date_from, "%d/%m") as d1, date_format(date_to, "%d/%m") as d2,format(minimum_amount,2) as min, free_shipping, reduction_percent, reduction_amount from aa_cart_rule where id_cart_rule IN (
Select id_cart_rule from aa_cart_rule_product_rule_group where quantity>0 and id_product_rule_group IN (
Select id_product_rule_group from aa_cart_rule_product_rule where type="categories" and id_product_rule IN (
Select id_product_rule from aa_cart_rule_product_rule_value where id_item IN
(SELECT id_category from aa_category_product WHERE id_product = ))))
AND date_from < now() and date_to > now() and active=1 and quantity > quantity_per_user and code =""</pre>
at line 782 in file classes/db/Db.php
777. if ($webservice_call && $errno) {
778. $dbg = debug_backtrace();
779. WebserviceRequest::getInstance()->setError(500, '[SQL Error] ' . $this->getMsgError() . '. From ' . (isset($dbg[3]['class']) ? $dbg[3]['class'] : '') . '->' . $dbg[3]['function'] . '() Query was : ' . $sql, 97);
780. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
781. if ($sql) {
782. throw new PrestaShopDatabaseException($this->getMsgError() . '<br /><br /><pre>' . $sql . '</pre>');
783. }
784.
785. throw new PrestaShopDatabaseException($this->getMsgError());
786. }
787. }
380. $this->result = $this->_query($sql);
381. }
382. }
383.
384. if (_PS_DEBUG_SQL_) {
385. $this->displayError($sql);
386. }
387.
388. return $this->result;
389. }
390.
Argument [0] Select id_cart_rule, date_format(date_from, "%d/%m") as d1, date_format(date_to, "%d/%m") as d2,format(minimum_amount,2) as min, free_shipping, reduction_percent, reduction_amount from aa_cart_rule where id_cart_rule IN ( Select id_cart_rule from aa_cart_rule_product_rule_group where quantity>0 and id_product_rule_group IN ( Select id_product_rule_group from aa_cart_rule_product_rule where type="categories" and id_product_rule IN ( Select id_product_rule from aa_cart_rule_product_rule_value where id_item IN (SELECT id_category from aa_category_product WHERE id_product = )))) AND date_from < now() and date_to > now() and active=1 and quantity > quantity_per_user and code =""
609. }
610.
611. return $this->execute($sql, $use_cache);
612. }
613.
614. $this->result = $this->query($sql);
615.
616. /*$time_limit = 0.01;
617.
618.
619. if (microtime(true) - $time > $time_limit) {
Argument [0] Select id_cart_rule, date_format(date_from, "%d/%m") as d1, date_format(date_to, "%d/%m") as d2,format(minimum_amount,2) as min, free_shipping, reduction_percent, reduction_amount from aa_cart_rule where id_cart_rule IN ( Select id_cart_rule from aa_cart_rule_product_rule_group where quantity>0 and id_product_rule_group IN ( Select id_product_rule_group from aa_cart_rule_product_rule where type="categories" and id_product_rule IN ( Select id_product_rule from aa_cart_rule_product_rule_value where id_item IN (SELECT id_category from aa_category_product WHERE id_product = )))) AND date_from < now() and date_to > now() and active=1 and quantity > quantity_per_user and code =""
254.
255. $popusti_k_result = Db::getInstance()->executeS('Select id_cart_rule, date_format(date_from, "%d/%m") as d1, date_format(date_to, "%d/%m") as d2,format(minimum_amount,2) as min, free_shipping, reduction_percent, reduction_amount from aa_cart_rule where id_cart_rule IN (
256. Select id_cart_rule from aa_cart_rule_product_rule_group where quantity>0 and id_product_rule_group IN (
257. Select id_product_rule_group from aa_cart_rule_product_rule where type="categories" and id_product_rule IN (
258. Select id_product_rule from aa_cart_rule_product_rule_value where id_item IN
259. (SELECT id_category from aa_category_product WHERE id_product = ' . $this->product->id . '))))
260. AND date_from < now() and date_to > now() and active=1 and quantity > quantity_per_user and code =""');
261.
262.
263.
264. $brojacp=1;
Argument [0] Select id_cart_rule, date_format(date_from, "%d/%m") as d1, date_format(date_to, "%d/%m") as d2,format(minimum_amount,2) as min, free_shipping, reduction_percent, reduction_amount from aa_cart_rule where id_cart_rule IN ( Select id_cart_rule from aa_cart_rule_product_rule_group where quantity>0 and id_product_rule_group IN ( Select id_product_rule_group from aa_cart_rule_product_rule where type="categories" and id_product_rule IN ( Select id_product_rule from aa_cart_rule_product_rule_value where id_item IN (SELECT id_category from aa_category_product WHERE id_product = )))) AND date_from < now() and date_to > now() and active=1 and quantity > quantity_per_user and code =""
282. /**
283. * Starts the controller process (this method should not be overridden!).
284. */
285. public function run()
286. {
287. $this->init();
288. if ($this->checkAccess()) {
289. // setMedia MUST be called before postProcess
290. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
291. $this->setMedia();
292. }
513. if (isset($params_hook_action_dispatcher)) {
514. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
515. }
516.
517. // Running controller
518. $controller->run();
519.
520. // Execute hook dispatcher after
521. if (isset($params_hook_action_dispatcher)) {
522. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
523. }
23. * @copyright Since 2007 PrestaShop SA and Contributors
24. * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
25. */
26.
27. require dirname(__FILE__).'/config/config.inc.php';
28. Dispatcher::getInstance()->dispatch();