$sql = "SELECT v.*, u.nickname as author, u.id as author_id, u.login, u.is_deleted as is_deleted, p.imageurl, c.title as cat_title, c.seolink FROM cms_job_vacancy v LEFT JOIN cms_users u ON u.id = v.user_id INNER JOIN cms_user_profiles p ON p.user_id = v.user_id INNER JOIN cms_job_cats c ON c.id = v.category_id WHERE v.published = 1 AND v.enddate >= NOW() AND u.is_locked = 0 AND u.is_deleted = 0 ";
DATABASE ERROR: SELECT 1 FROM cms_job_vacancy WHERE published=1 AND enddate >= NOW() AND category_id= 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 '' at line 1