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 `pages`.`en_publish` != 'no'
ORDER BY `expertise_project`.`order`' at line 4Getting list of linked projects SELECT *
FROM `expertise_project`
LEFT JOIN `pages` ON `pages`.`page_id` = `expertise_project`.`project_id`
WHERE `expertise_project`.`expertise_id` = AND `pages`.`en_publish` != 'no'
ORDER BY `expertise_project`.`order`