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 pl.id_lang = 1' at line 2SELECT * FROM as_smart_blog_category_lang pl, as_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 = 1
at line 646 in file classes/db/Db.php
641. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
642. }
643. elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
644. {
645. if ($sql)
646. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
647. throw new PrestaShopDatabaseException($this->getMsgError());
648. }
649. }
650.
651. /**
335. if ($this->connect())
336. $this->result = $this->_query($sql);
337. }
338.
339. if (_PS_DEBUG_SQL_)
340. $this->displayError($sql);
341. return $this->result;
342. }
343.
344. /**
345. * Execute an INSERT query
Argument [0] SELECT * FROM as_smart_blog_category_lang pl, as_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 = 1
511. {
512. $this->last_cached = true;
513. return $result;
514. }
515.
516. $this->result = $this->query($sql);
517.
518. if (!$this->result)
519. $result = false;
520. else
521. {
Argument [0] SELECT * FROM as_smart_blog_category_lang pl, as_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 = 1
52.
53. public static function getNameCategory($id){
54. $id_lang = (int)Context::getContext()->language->id;
55. $sql = 'SELECT * FROM '._DB_PREFIX_.'smart_blog_category_lang pl, '._DB_PREFIX_.'smart_blog_category p
56. WHERE pl.id_smart_blog_category=p.id_smart_blog_category AND p.id_smart_blog_category='.$id.' AND pl.id_lang = '.$id_lang;
57. if (!$result = Db::getInstance()->executeS($sql))
58. return false;
59. return $result;
60. }
61.
62. public static function getCatName($id){
Argument [0] SELECT * FROM as_smart_blog_category_lang pl, as_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 = 1
24. $post = $SmartBlogPost->getPost($id_post,$id_lang);
25. $tags = $SmartBlogPost->getProductTags($id_post);
26. $comment = $blogcomment->getComment($id_post);
27. $countcomment = $blogcomment->getToltalComment($id_post);
28. $id_cate = $post['id_category'];
29. $title_category = $BlogCategory->getNameCategory($id_cate);
30. if (file_exists(_PS_MODULE_DIR_.'smartblog/images/' . (int)Tools::getValue('id_post') . '.jpg') )
31. {
32. $post_img = (int)Tools::getValue('id_post');
33. }else{
34. $post_img = 'no';
Argument [0]
175.
176. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className)))
177. $this->initHeader();
178.
179. if ($this->viewAccess())
180. $this->initContent();
181. else
182. $this->errors[] = Tools::displayError('Access denied.');
183.
184. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className)))
185. $this->initFooter();
368. // Execute hook dispatcher
369. if (isset($params_hook_action_dispatcher))
370. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
371.
372. // Running controller
373. $controller->run();
374. }
375. catch (PrestaShopException $e)
376. {
377. $e->displayMessage();
378. }
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();