طراحی سایت رستوران و کافی شاپ

Database Error; SQL: SELECT DISTINCT `t`.* FROM `wp_posts` AS `t` LEFT JOIN `wp_podsrel` AS `rel_portfolio_works` ON `rel_portfolio_works`.`field_id` = 139 AND `rel_portfolio_works`.`item_id` = `t`.`ID` LEFT JOIN `wp_posts` AS `portfolio_works` ON `portfolio_works`.`ID` = `rel_portfolio_works`.`related_item_id` LEFT JOIN `wp_postmeta` AS `portfolio_special` ON `portfolio_special`.`meta_key` = 'portfolio_special' AND `portfolio_special`.`post_id` = `t`.`ID` LEFT JOIN `wp_postmeta` AS `portfolio_date_code` ON `portfolio_date_code`.`meta_key` = 'portfolio_date_code' AND `portfolio_date_code`.`post_id` = `t`.`ID` WHERE ( ( `portfolio_works`.`ID`= AND `portfolio_special`.`meta_value`='1' ) AND ( `t`.`post_type` = "portfolio" ) AND ( `t`.`post_status` IN ( "publish" ) ) ) ORDER BY `portfolio_date_code`.`meta_value` DESC, `t`.`menu_order`, `t`.`post_title`, `t`.`post_date` LIMIT 0, 8; Response: 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 `portfolio_special`.`meta_value`='1' ) AND ( `t`.`post_type` = "portfolio" )' at line 24