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 '))
ORDER BY sec.`position`,sec.`location`' at line 6
SELECT sec.*, secl.`title`, secl.`url`, secl.`text`, st_easy_content_shop.`id_shop`
FROM `ps_st_easy_content` sec
INNER JOIN ps_st_easy_content_shop st_easy_content_shop
ON (st_easy_content_shop.id_st_easy_content = sec.id_st_easy_content AND st_easy_content_shop.id_shop = 1)
LEFT JOIN `ps_st_easy_content_lang` secl ON (sec.`id_st_easy_content` = secl.`id_st_easy_content`)
WHERE secl.`id_lang` = 3 AND sec.`location` IN (25) AND sec.`active`=1 AND (sec.id_category = 0 OR (sec.id_category > 0 AND sec.id_category = ))
ORDER BY sec.`position`,sec.`location`
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 sec.*, secl.`title`, secl.`url`, secl.`text`, st_easy_content_shop.`id_shop` FROM `ps_st_easy_content` sec INNER JOIN ps_st_easy_content_shop st_easy_content_shop ON (st_easy_content_shop.id_st_easy_content = sec.id_st_easy_content AND st_easy_content_shop.id_shop = 1) LEFT JOIN `ps_st_easy_content_lang` secl ON (sec.`id_st_easy_content` = secl.`id_st_easy_content`) WHERE secl.`id_lang` = 3 AND sec.`location` IN (25) AND sec.`active`=1 AND (sec.id_category = 0 OR (sec.id_category > 0 AND sec.id_category = )) ORDER BY sec.`position`,sec.`location`
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 sec.*, secl.`title`, secl.`url`, secl.`text`, st_easy_content_shop.`id_shop` FROM `ps_st_easy_content` sec INNER JOIN ps_st_easy_content_shop st_easy_content_shop ON (st_easy_content_shop.id_st_easy_content = sec.id_st_easy_content AND st_easy_content_shop.id_shop = 1) LEFT JOIN `ps_st_easy_content_lang` secl ON (sec.`id_st_easy_content` = secl.`id_st_easy_content`) WHERE secl.`id_lang` = 3 AND sec.`location` IN (25) AND sec.`active`=1 AND (sec.id_category = 0 OR (sec.id_category > 0 AND sec.id_category = )) ORDER BY sec.`position`,sec.`location`
182. SELECT sec.*, secl.`title`, secl.`url`, secl.`text`, st_easy_content_shop.`id_shop`
183. FROM `'._DB_PREFIX_.'st_easy_content` sec
184. '.Shop::addSqlAssociation('st_easy_content', 'sec').'
185. LEFT JOIN `'._DB_PREFIX_.'st_easy_content_lang` secl ON (sec.`id_st_easy_content` = secl.`id_st_easy_content`)
186. WHERE secl.`id_lang` = '.(int)$id_lang.($location ? ' AND sec.`location` IN ('.implode(',',$location).')' : '').($active ? ' AND sec.`active`=1 ' : '').(is_array($field) && count($field) ? $where : '').'
187. ORDER BY sec.`position`,sec.`location`');
188. }
189. public static function getById($id_lang,$id=0)
190. {
191. Shop::addTableAssociation('st_easy_content', array('type' => 'shop'));
192. return Db::getInstance()->executeS('
Argument [0] SELECT sec.*, secl.`title`, secl.`url`, secl.`text`, st_easy_content_shop.`id_shop` FROM `ps_st_easy_content` sec INNER JOIN ps_st_easy_content_shop st_easy_content_shop ON (st_easy_content_shop.id_st_easy_content = sec.id_st_easy_content AND st_easy_content_shop.id_shop = 1) LEFT JOIN `ps_st_easy_content_lang` secl ON (sec.`id_st_easy_content` = secl.`id_st_easy_content`) WHERE secl.`id_lang` = 3 AND sec.`location` IN (25) AND sec.`active`=1 AND (sec.id_category = 0 OR (sec.id_category > 0 AND sec.id_category = )) ORDER BY sec.`position`,sec.`location`
1234. return $helper;
1235. }
1236.
1237. private function _prepareHook($location)
1238. {
1239. $easy_content = StEasyContentClass::getListContent($this->context->language->id,$location,1);
1240. if(!$easy_content)
1241. return false;
1242.
1243. $location_id_array = array(36, 37, 86, 87, 98, 99);
1244. $page = '';
Argument [0] 3 Argument [1] 25 Argument [2] 1
1521. return false;
1522. return $this->display(__FILE__, 'steasycontent.tpl', $this->stGetCacheId(24));
1523. }
1524. public function hookDisplayCategoryHeader($params)
1525. {
1526. if(!$this->_prepareHook(25,1))
1527. return false;
1528. return $this->display(__FILE__, 'steasycontent.tpl');
1529. }
1530. public function hookDisplayCategoryFooter($params)
1531. {
Argument [0] 25 Argument [1] 1
586. }
587. }
588.
589. // Immediately return the result if we do not log performances
590. if (!Module::$_log_modules_perfs) {
591. return $module->{$method}($params);
592. }
593.
594. // Store time and memory before and after hook call and save the result in the database
595. $time_start = microtime(true);
596. $memory_start = memory_get_usage(true);
Argument [0]
541. Tools::waitUntilFileIsModified($moduleInstance->push_filename, $moduleInstance->push_time_limit);
542. }
543.
544. // Call hook method
545. if ($hook_callable) {
546. $display = Hook::coreCallHook($moduleInstance, 'hook'.$hook_name, $hook_args);
547. } elseif ($hook_retro_callable) {
548. $display = Hook::coreCallHook($moduleInstance, 'hook'.$retro_hook_name, $hook_args);
549. }
550.
551. // Live edit
Argument [0] Argument [1] hookdisplayCategoryHeader Argument [2]
41. }
42. public function initContent()
43. {
44. parent::initContent();
45. $this->context->smarty->assign(array(
46. 'HOOK_CATEGORY_HEADER' => Hook::exec('displayCategoryHeader'),
47. 'HOOK_CATEGORY_FOOTER' => Hook::exec('displayCategoryFooter'),
48. 'display_category_title' => Configuration::get('STSN_DISPLAY_CATEGORY_TITLE'),
49. 'display_category_image' => Configuration::get('STSN_DISPLAY_CATEGORY_IMAGE'),
50. 'display_category_desc' => Configuration::get('STSN_DISPLAY_CATEGORY_DESC'),
51. 'display_subcategory' => Configuration::get('STSN_DISPLAY_SUBCATE'),
Argument [0] displayCategoryHeader
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();