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 = 6' 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 = 6
at line 765 in file classes/db/Db.php
760. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
761. }
762. elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
763. {
764. if ($sql)
765. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
766.
767. throw new PrestaShopDatabaseException($this->getMsgError());
768. }
769. }
770.
413. if ($this->connect())
414. $this->result = $this->_query($sql);
415. }
416.
417. if (_PS_DEBUG_SQL_)
418. $this->displayError($sql);
419.
420. return $this->result;
421. }
422.
423. /**
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 = 6
615. if (defined('_PS_MODE_DEV_') && _PS_MODE_DEV_)
616. throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries');
617. return $this->execute($sql, $use_cache);
618. }
619.
620. $this->result = $this->query($sql);
621.
622. if (!$this->result)
623. $result = false;
624. else
625. {
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 = 6
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 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 = 6
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/' . Tools::getValue('id_post') . '.jpg') )
31. {
32. $post_img = 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();
216. }
217. }
218. echo $content;
219. } else {
220. $this->express_start_time = microtime(true);
221. $display = parent::run();
222. }
223. }
224. }
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();