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 '' at line 10SELECT a.*, b.*, d.id_cs_blog_category as category_parent FROM ps_cs_blog_post a
LEFT JOIN ps_cs_blog_post_lang b
ON (a.id_cs_blog_post= b.id_cs_blog_post AND b.id_shop = 1)
LEFT JOIN ps_cs_blog_post_shop c
ON (a.id_cs_blog_post= c.id_cs_blog_post)
LEFT JOIN ps_cs_blog_category_post d
ON (a.id_cs_blog_post= d.id_cs_blog_post)
WHERE a.active = 1 AND b.id_lang = 1 AND c.id_shop = 1 AND d.id_cs_blog_category=4
ORDER BY a.date_add DESC
LIMIT 0,
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 a.*, b.*, d.id_cs_blog_category as category_parent FROM ps_cs_blog_post a LEFT JOIN ps_cs_blog_post_lang b ON (a.id_cs_blog_post= b.id_cs_blog_post AND b.id_shop = 1) LEFT JOIN ps_cs_blog_post_shop c ON (a.id_cs_blog_post= c.id_cs_blog_post) LEFT JOIN ps_cs_blog_category_post d ON (a.id_cs_blog_post= d.id_cs_blog_post) WHERE a.active = 1 AND b.id_lang = 1 AND c.id_shop = 1 AND d.id_cs_blog_category=4 ORDER BY a.date_add DESC LIMIT 0,
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 a.*, b.*, d.id_cs_blog_category as category_parent FROM ps_cs_blog_post a LEFT JOIN ps_cs_blog_post_lang b ON (a.id_cs_blog_post= b.id_cs_blog_post AND b.id_shop = 1) LEFT JOIN ps_cs_blog_post_shop c ON (a.id_cs_blog_post= c.id_cs_blog_post) LEFT JOIN ps_cs_blog_category_post d ON (a.id_cs_blog_post= d.id_cs_blog_post) WHERE a.active = 1 AND b.id_lang = 1 AND c.id_shop = 1 AND d.id_cs_blog_category=4 ORDER BY a.date_add DESC LIMIT 0,
173. WHERE a.active = 1 AND b.id_lang = '.$id_lang.' AND c.id_shop = '.$id_shop.' '.($this->id_cs_blog_category != null ? ' AND d.id_cs_blog_category='.$this->id_cs_blog_category : 'AND d.id_cs_blog_category=1').'
174. ORDER BY '.($orderby == 'date_add' ? 'a.' : 'b.').$orderby.' '.$orderway.'
175. LIMIT '.$start.','.$end.'
176. ';
177.
178. $posts = Db::getInstance()->ExecuteS($sql);
179. $posts_new = array();
180. foreach ($posts as $post) {
181.
182. $author = new Employee($post['author']);
183. $post['author'] = $author->firstname.' '.$author->lastname;
Argument [0] SELECT a.*, b.*, d.id_cs_blog_category as category_parent FROM ps_cs_blog_post a LEFT JOIN ps_cs_blog_post_lang b ON (a.id_cs_blog_post= b.id_cs_blog_post AND b.id_shop = 1) LEFT JOIN ps_cs_blog_post_shop c ON (a.id_cs_blog_post= c.id_cs_blog_post) LEFT JOIN ps_cs_blog_category_post d ON (a.id_cs_blog_post= d.id_cs_blog_post) WHERE a.active = 1 AND b.id_lang = 1 AND c.id_shop = 1 AND d.id_cs_blog_category=4 ORDER BY a.date_add DESC LIMIT 0,
61. $this->context->smarty->assign('url_rewrite', $url_rewrite);
62. $page = Tools::getValue('p');
63. if ($page == null)
64. $page = 0;
65.
66. $cs_post_list = $this->getPostes($page,$id_lang,$id_shop);
67. if ($cs_post_list != null)
68. {
69. $this->context->smarty->assign('cs_postes_empty', 0);
70. $this->context->smarty->assign('cs_post_list', $cs_post_list);
71. }
Argument [0] 0 Argument [1] 1 Argument [2] 1
17.
18. public function initContent()
19. {
20. parent::initContent();
21. $this->csLink = new csLink();
22. $this->_display();
23. $this->setTemplate('categoryPost.tpl');
24. }
25.
26.
27. function _display()
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();