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 'AND pl.id_lang = 3' at line 2SELECT * FROM ps_smart_blog_category_lang pl, ps_smart_blog_category p
WHERE pl.id_smart_blog_category=p.id_smart_blog_category AND p.id_smart_blog_category= AND pl.id_lang = 3
at line 635 in file classes/db/Db.php
629. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$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. /**
319. if ($sql instanceof DbQuery)
320. $sql = $sql->build();
321.
322. $this->result = $this->_query($sql);
323. if (_PS_DEBUG_SQL_)
324. $this->displayError($sql);
325. return $this->result;
326. }
327.
328. /**
329. * Execute an INSERT query
Argument [0] SELECT * FROM ps_smart_blog_category_lang pl, ps_smart_blog_category p WHERE pl.id_smart_blog_category=p.id_smart_blog_category AND p.id_smart_blog_category= AND pl.id_lang = 3
495. {
496. $this->last_cached = true;
497. return $result;
498. }
499.
500. $this->result = $this->query($sql);
501.
502. if (!$this->result)
503. $result = false;
504. else
505. {
Argument [0] SELECT * FROM ps_smart_blog_category_lang pl, ps_smart_blog_category p WHERE pl.id_smart_blog_category=p.id_smart_blog_category AND p.id_smart_blog_category= AND pl.id_lang = 3
51.
52. public static function getNameCategory($id){
53. $id_lang = (int)Context::getContext()->language->id;
54. $sql = 'SELECT * FROM '._DB_PREFIX_.'smart_blog_category_lang pl, '._DB_PREFIX_.'smart_blog_category p
55. WHERE pl.id_smart_blog_category=p.id_smart_blog_category AND p.id_smart_blog_category='.$id.' AND pl.id_lang = '.$id_lang;
56. if (!$result = Db::getInstance()->executeS($sql))
57. return false;
58. return $result;
59. }
60.
61. public static function getCatName($id){
Argument [0] SELECT * FROM ps_smart_blog_category_lang pl, ps_smart_blog_category p WHERE pl.id_smart_blog_category=p.id_smart_blog_category AND p.id_smart_blog_category= AND pl.id_lang = 3
23. $post = $SmartBlogPost->getPost($id_post,$id_lang);
24. $tags = $SmartBlogPost->getProductTags($id_post);
25. $comment = $blogcomment->getComment($id_post);
26. $countcomment = $blogcomment->getToltalComment($id_post);
27. $id_cate = $post['id_category'];
28. $title_category = $BlogCategory->getNameCategory($id_cate);
29. if (file_exists(_PS_MODULE_DIR_.'smartblog/images/' . Tools::getValue('id_post') . '.jpg') )
30. {
31. $post_img = Tools::getValue('id_post');
32. }else{
33. $post_img = 'no';
Argument [0]
174.
175. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
176. $this->initHeader();
177.
178. if ($this->viewAccess())
179. $this->initContent();
180. else
181. $this->errors[] = Tools::displayError('Access denied.');
182.
183. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className)))
184. $this->initFooter();
367. // Execute hook dispatcher
368. if (isset($params_hook_action_dispatcher))
369. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
370.
371. // Running controller
372. $controller->run();
373. }
374. catch (PrestaShopException $e)
375. {
376. $e->displayMessage();
377. }
22. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23. * International Registered Trademark & Property of PrestaShop SA
24. */
25.
26. require(dirname(__FILE__).'/config/config.inc.php');
27. Dispatcher::getInstance()->dispatch();