SQLSTATE[42000]: Syntax error or access violation: 1064 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 '?) ORDER BY `datetime` desc LIMIT 15' at line 2, query was: SELECT `news`.*, `news-category`.`name` AS `category_name` FROM `news` LEFT JOIN `news-category` ON `news-category`.id = `news-category_id` WHERE (news.state='active') AND (news.master_id='148') AND (`category`=?) ORDER BY `datetime` desc LIMIT 15