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 '?id_post=9' at line 5SELECT * FROM ps_smart_blog_post p INNER JOIN
ps_smart_blog_post_lang pl ON p.id_smart_blog_post=pl.id_smart_blog_post INNER JOIN
ps_smart_blog_post_shop ps ON pl.id_smart_blog_post = ps.id_smart_blog_post
WHERE pl.id_lang=1
AND p.active= 1 AND p.id_smart_blog_post = 9?id_post=9
at line 744 in file classes/db/Db.php
739. if ($webservice_call && $errno) {
740. $dbg = debug_backtrace();
741. WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
742. } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
743. if ($sql) {
744. throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
745. }
746.
747. throw new PrestaShopDatabaseException($this->getMsgError());
748. }
749. }
373. $this->result = $this->_query($sql);
374. }
375. }
376.
377. if (_PS_DEBUG_SQL_) {
378. $this->displayError($sql);
379. }
380.
381. return $this->result;
382. }
383.
Argument [0] SELECT * FROM ps_smart_blog_post p INNER JOIN ps_smart_blog_post_lang pl ON p.id_smart_blog_post=pl.id_smart_blog_post INNER JOIN ps_smart_blog_post_shop ps ON pl.id_smart_blog_post = ps.id_smart_blog_post WHERE pl.id_lang=1 AND p.active= 1 AND p.id_smart_blog_post = 9?id_post=9
591. throw new PrestaShopDatabaseException('Db->executeS() must be used only with select, show, explain or describe queries');
592. }
593. return $this->execute($sql, $use_cache);
594. }
595.
596. $this->result = $this->query($sql);
597.
598. if (!$this->result) {
599. $result = false;
600. } else {
601. if (!$array) {
Argument [0] SELECT * FROM ps_smart_blog_post p INNER JOIN ps_smart_blog_post_lang pl ON p.id_smart_blog_post=pl.id_smart_blog_post INNER JOIN ps_smart_blog_post_shop ps ON pl.id_smart_blog_post = ps.id_smart_blog_post WHERE pl.id_lang=1 AND p.active= 1 AND p.id_smart_blog_post = 9?id_post=9
630. '._DB_PREFIX_.'smart_blog_post_lang pl ON p.id_smart_blog_post=pl.id_smart_blog_post INNER JOIN
631. '._DB_PREFIX_.'smart_blog_post_shop ps ON pl.id_smart_blog_post = ps.id_smart_blog_post
632. WHERE pl.id_lang='.$id_lang.'
633. AND p.active= 1 AND p.id_smart_blog_post = '.$id_post;
634.
635. if (!$post = Db::getInstance()->executeS($sql))
636. return false;
637.
638. if($post[0]['meta_title'] == '' && $post[0]['meta_title'] == NULL){
639. $meta['meta_title'] = Configuration::get('smartblogmetatitle');
640. }else{
Argument [0] SELECT * FROM ps_smart_blog_post p INNER JOIN ps_smart_blog_post_lang pl ON p.id_smart_blog_post=pl.id_smart_blog_post INNER JOIN ps_smart_blog_post_shop ps ON pl.id_smart_blog_post = ps.id_smart_blog_post WHERE pl.id_lang=1 AND p.active= 1 AND p.id_smart_blog_post = 9?id_post=9
7. parent::initContent();
8. if($id_category = Tools::getvalue('id_category') && Tools::getvalue('id_category') != Null){
9. $this->context->smarty->assign(BlogCategory::GetMetaByCategory(Tools::getvalue('id_category')));
10. }
11. if($id_post = Tools::getvalue('id_post') && Tools::getvalue('id_post') != Null){
12. $this->context->smarty->assign(SmartBlogPost::GetPostMetaByPost(Tools::getvalue('id_post')));
13. }
14. if(Tools::getvalue('id_category') == Null && Tools::getvalue('id_post') == Null){
15. $meta['meta_title'] = Configuration::get('smartblogmetatitle');
16. $meta['meta_description'] = Configuration::get('smartblogmetadescrip');
17. $meta['meta_keywords'] = Configuration::get('smartblogmetakeyword');
Argument [0] 9?id_post=9
11. {
12. parent::init();
13. }
14. public function initContent()
15. {
16. parent::initContent();
17. Hook::exec('actionsbsingle', array('id_post' => Tools::getValue('id_post')));
18. $blogcomment = new Blogcomment();
19. $SmartBlogPost = new SmartBlogPost();
20. $BlogCategory = new BlogCategory();
21. $id_post = Tools::getValue('id_post');
200. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) {
201. $this->initHeader();
202. }
203.
204. if ($this->viewAccess()) {
205. $this->initContent();
206. } else {
207. $this->errors[] = $this->trans('Access denied.', array(), 'Admin.Notifications.Error');
208. }
209.
210. if (!$this->content_only && ($this->display_footer || (isset($this->className) && $this->className))) {
374. if (isset($params_hook_action_dispatcher)) {
375. Hook::exec('actionDispatcher', $params_hook_action_dispatcher);
376. }
377.
378. // Running controller
379. $controller->run();
380.
381. // Execute hook dispatcher after
382. if (isset($params_hook_action_dispatcher)) {
383. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher);
384. }
23. * @license https://opensource.org/licenses/OSL-3.0 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();