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 ')
GROUP BY p.id_product LIMIT 1' at line 13
SELECT p.*, product_shop.*, pl.*, image_shop.`id_image` id_image, il.`legend`, IFNULL(product_attribute_shop.id_product_attribute, 0) id_product_attribute
FROM `ps_product` p
NATURAL LEFT JOIN `ps_product_lang` pl
INNER JOIN ps_product_shop product_shop
ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1)
LEFT JOIN `ps_product_attribute_shop` product_attribute_shop
ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop=1)
LEFT JOIN `ps_image_shop` image_shop
ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=1)
LEFT JOIN `ps_image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = 5)
WHERE pl.`id_lang` = 5
AND pl.id_shop = 1
AND p.`id_product` IN (552,577,578,579,624,647,671,717,719,763,784,808,849,850,859,921,969,970,971,972,973,1081,1111,1112,1147,1210,1216,1226,1227,1230,1231,1276,1278,1279,1313,1314,1365,1420,1440,1451,1518,1525,1528,1570,1571,1575,1579,1588,1639,1648,1649,1650,1652,1657,1658,1660,1666,1667,1691,1692,1693,1707,1726,1727,1728,1731,1741,1742,1786,1787,1788,1789,1790,1791,1792,1793,1795,1796,1802,1803,1805,1806,1813,1814,1824,1855,1885,1888,1895,1920,1921,1922,1979,1980,1991,1992,1995,1996,2007,2008,2009,2010,2011,2028,2029,2030,2031,2033,2037,2086,2087,2088,2096,2105,2114,2115,2129,2131,2167,2168,2184,2191,2192,2193,2203,2208,2209,2213,2222,2223,2250,2251,2257,2284,2301,2302,2303,2310,2315,2320,2327,2328,2336,2347,2356,2357,2386,2387,2393,2394,2401,2402,2403,2404,2414,2415,2417,2418,2434,2473,2474,2481,2482,2483,2484,2485,2487,2489,2500,2503,2504,2505,2506,2508,2510,2511,2513,2516,2521,2524,2528,2529,2551,2552,2576,2577,2585,2586,2588,2589,2590,2591,2592,2593,2594,2631,2654,2655,2684,2685,2701,2710,2763,2850,2862,2865,2866,2868,2869,)
GROUP BY p.id_product LIMIT 1
at line 791 in file classes/db/Db.php
786. if ($webservice_call && $errno) {
787. $dbg = debug_backtrace();
788. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
789. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
790. if ($sql) {
791. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
792. }
793.
794. throw new PrestaShopDatabaseException($this->getMsgError());
795. }
796. }
420. $this->result = $this->_query($sql);
421. }
422. }
423.
424. if (_PS_DEBUG_SQL_) {
425. $this->displayError($sql);
426. }
427.
428. return $this->result;
429. }
430.
Argument [0] SELECT p.*, product_shop.*, pl.*, image_shop.`id_image` id_image, il.`legend`, IFNULL(product_attribute_shop.id_product_attribute, 0) id_product_attribute FROM `ps_product` p NATURAL LEFT JOIN `ps_product_lang` pl INNER JOIN ps_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN `ps_product_attribute_shop` product_attribute_shop ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop=1) LEFT JOIN `ps_image_shop` image_shop ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=1) LEFT JOIN `ps_image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = 5) WHERE pl.`id_lang` = 5 AND pl.id_shop = 1 AND p.`id_product` IN (552,577,578,579,624,647,671,717,719,763,784,808,849,850,859,921,969,970,971,972,973,1081,1111,1112,1147,1210,1216,1226,1227,1230,1231,1276,1278,1279,1313,1314,1365,1420,1440,1451,1518,1525,1528,1570,1571,1575,1579,1588,1639,1648,1649,1650,1652,1657,1658,1660,1666,1667,1691,1692,1693,1707,1726,1727,1728,1731,1741,1742,1786,1787,1788,1789,1790,1791,1792,1793,1795,1796,1802,1803,1805,1806,1813,1814,1824,1855,1885,1888,1895,1920,1921,1922,1979,1980,1991,1992,1995,1996,2007,2008,2009,2010,2011,2028,2029,2030,2031,2033,2037,2086,2087,2088,2096,2105,2114,2115,2129,2131,2167,2168,2184,2191,2192,2193,2203,2208,2209,2213,2222,2223,2250,2251,2257,2284,2301,2302,2303,2310,2315,2320,2327,2328,2336,2347,2356,2357,2386,2387,2393,2394,2401,2402,2403,2404,2414,2415,2417,2418,2434,2473,2474,2481,2482,2483,2484,2485,2487,2489,2500,2503,2504,2505,2506,2508,2510,2511,2513,2516,2521,2524,2528,2529,2551,2552,2576,2577,2585,2586,2588,2589,2590,2591,2592,2593,2594,2631,2654,2655,2684,2685,2701,2710,2763,2850,2862,2865,2866,2868,2869,) GROUP BY p.id_product LIMIT 1
638. throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries');
639. }
640. return $this->execute($sql, $use_cache);
641. }
642.
643. $this->result = $this->query($sql);
644.
645. if (!$this->result) {
646. $result = false;
647. } else {
648. if (!$array) {
Argument [0] SELECT p.*, product_shop.*, pl.*, image_shop.`id_image` id_image, il.`legend`, IFNULL(product_attribute_shop.id_product_attribute, 0) id_product_attribute FROM `ps_product` p NATURAL LEFT JOIN `ps_product_lang` pl INNER JOIN ps_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN `ps_product_attribute_shop` product_attribute_shop ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop=1) LEFT JOIN `ps_image_shop` image_shop ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=1) LEFT JOIN `ps_image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = 5) WHERE pl.`id_lang` = 5 AND pl.id_shop = 1 AND p.`id_product` IN (552,577,578,579,624,647,671,717,719,763,784,808,849,850,859,921,969,970,971,972,973,1081,1111,1112,1147,1210,1216,1226,1227,1230,1231,1276,1278,1279,1313,1314,1365,1420,1440,1451,1518,1525,1528,1570,1571,1575,1579,1588,1639,1648,1649,1650,1652,1657,1658,1660,1666,1667,1691,1692,1693,1707,1726,1727,1728,1731,1741,1742,1786,1787,1788,1789,1790,1791,1792,1793,1795,1796,1802,1803,1805,1806,1813,1814,1824,1855,1885,1888,1895,1920,1921,1922,1979,1980,1991,1992,1995,1996,2007,2008,2009,2010,2011,2028,2029,2030,2031,2033,2037,2086,2087,2088,2096,2105,2114,2115,2129,2131,2167,2168,2184,2191,2192,2193,2203,2208,2209,2213,2222,2223,2250,2251,2257,2284,2301,2302,2303,2310,2315,2320,2327,2328,2336,2347,2356,2357,2386,2387,2393,2394,2401,2402,2403,2404,2414,2415,2417,2418,2434,2473,2474,2481,2482,2483,2484,2485,2487,2489,2500,2503,2504,2505,2506,2508,2510,2511,2513,2516,2521,2524,2528,2529,2551,2552,2576,2577,2585,2586,2588,2589,2590,2591,2592,2593,2594,2631,2654,2655,2684,2685,2701,2710,2763,2850,2862,2865,2866,2868,2869,) GROUP BY p.id_product LIMIT 1
271. AND p.`id_product` IN ('.$packs.')
272. GROUP BY p.id_product';
273. if ($limit) {
274. $sql .= ' LIMIT '.(int)$limit;
275. }
276. $result = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($sql);
277. if (!$full) {
278. return $result;
279. }
280.
281. $array_result = array();
Argument [0] SELECT p.*, product_shop.*, pl.*, image_shop.`id_image` id_image, il.`legend`, IFNULL(product_attribute_shop.id_product_attribute, 0) id_product_attribute FROM `ps_product` p NATURAL LEFT JOIN `ps_product_lang` pl INNER JOIN ps_product_shop product_shop ON (product_shop.id_product = p.id_product AND product_shop.id_shop = 1) LEFT JOIN `ps_product_attribute_shop` product_attribute_shop ON (p.`id_product` = product_attribute_shop.`id_product` AND product_attribute_shop.`default_on` = 1 AND product_attribute_shop.id_shop=1) LEFT JOIN `ps_image_shop` image_shop ON (image_shop.`id_product` = p.`id_product` AND image_shop.cover=1 AND image_shop.id_shop=1) LEFT JOIN `ps_image_lang` il ON (image_shop.`id_image` = il.`id_image` AND il.`id_lang` = 5) WHERE pl.`id_lang` = 5 AND pl.id_shop = 1 AND p.`id_product` IN (552,577,578,579,624,647,671,717,719,763,784,808,849,850,859,921,969,970,971,972,973,1081,1111,1112,1147,1210,1216,1226,1227,1230,1231,1276,1278,1279,1313,1314,1365,1420,1440,1451,1518,1525,1528,1570,1571,1575,1579,1588,1639,1648,1649,1650,1652,1657,1658,1660,1666,1667,1691,1692,1693,1707,1726,1727,1728,1731,1741,1742,1786,1787,1788,1789,1790,1791,1792,1793,1795,1796,1802,1803,1805,1806,1813,1814,1824,1855,1885,1888,1895,1920,1921,1922,1979,1980,1991,1992,1995,1996,2007,2008,2009,2010,2011,2028,2029,2030,2031,2033,2037,2086,2087,2088,2096,2105,2114,2115,2129,2131,2167,2168,2184,2191,2192,2193,2203,2208,2209,2213,2222,2223,2250,2251,2257,2284,2301,2302,2303,2310,2315,2320,2327,2328,2336,2347,2356,2357,2386,2387,2393,2394,2401,2402,2403,2404,2414,2415,2417,2418,2434,2473,2474,2481,2482,2483,2484,2485,2487,2489,2500,2503,2504,2505,2506,2508,2510,2511,2513,2516,2521,2524,2528,2529,2551,2552,2576,2577,2585,2586,2588,2589,2590,2591,2592,2593,2594,2631,2654,2655,2684,2685,2701,2710,2763,2850,2862,2865,2866,2868,2869,) GROUP BY p.id_product LIMIT 1
240. $this->assignAttributesCombinations();
241.
242. // Pack management
243. $pack_items = Pack::isPack($this->product->id) ? Pack::getItemTable($this->product->id, $this->context->language->id, true) : array();
244. $this->context->smarty->assign('packItems', $pack_items);
245. $this->context->smarty->assign('packs', Pack::getPacksTable($this->product->id, $this->context->language->id, true, 1));
246.
247. if (isset($this->category->id) && $this->category->id) {
248. $return_link = Tools::safeOutput($this->context->link->getCategoryLink($this->category));
249. } else {
250. $return_link = 'javascript: history.back();';
Argument [0] 9 Argument [1] 5 Argument [2] 1 Argument [3] 1
184. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
185. $this->initHeader();
186. }
187.
188. if ($this->viewAccess()) {
189. $this->initContent();
190. } else {
191. $this->errors[] = Tools::displayError('Access denied.');
192. }
193.
194. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
362. if (isset($params_hook_action_dispatcher)) {
363. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
364. }
365.
366. // Running controller
367. $controller->run();
368. } catch (PrestaShopException $e) {
369. $e->displayMessage();
370. }
371. }
372.
23. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
24. * International Registered Trademark & Property of PrestaShop SA
25. */
26.
27. require(dirname(__FILE__).'/config/config.inc.php');
28. Dispatcher::getInstance()->dispatch();