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 5SELECT p.created, p.post_title, p.id, p.post_content AS post_excerpt, u.contact_name, u.title FROM posts p, users u WHERE u.id = p.user_id AND p.post_status = 'publish' AND p.id =