WordPress database error: [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 p.post_type='attachment' AND p.post_status = 'inherit' ) ) = 0 ) ) ' at line 18]
SELECT p.ID FROM wpwd_posts AS p JOIN wpwd_icl_translations t ON t.element_id = p.ID AND t.element_type = 'post_portfolio' WHERE p.post_date > '2018-04-27 19:30:30' AND p.post_type = 'portfolio' AND p.post_status = 'publish' AND (language_code = 'es' OR ( t.language_code = 'pt-pt' AND p.post_type IN ( 'portfolio' ) AND ( ( ( SELECT COUNT(element_id) FROM wpwd_icl_translations WHERE trid = t.trid AND language_code = 'es' ) = 0 ) OR ( ( SELECT COUNT(element_id) FROM wpwd_icl_translations t2 JOIN wpwd_posts p ON p.id = t2.element_id WHERE t2.trid = t.trid AND t2.language_code = 'es' AND ( p.post_status = 'publish' OR AND p.post_type='attachment' AND p.post_status = 'inherit' ) ) = 0 ) ) ) ) ORDER BY p.post_date ASC LIMIT 1

WordPress database error: [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 p.post_type='attachment' AND p.post_status = 'inherit' ) ) = 0 ) ) ' at line 18]
SELECT p.ID FROM wpwd_posts AS p JOIN wpwd_icl_translations t ON t.element_id = p.ID AND t.element_type = 'post_portfolio' WHERE p.post_date < '2018-04-27 19:30:30' AND p.post_type = 'portfolio' AND p.post_status = 'publish' AND (language_code = 'es' OR ( t.language_code = 'pt-pt' AND p.post_type IN ( 'portfolio' ) AND ( ( ( SELECT COUNT(element_id) FROM wpwd_icl_translations WHERE trid = t.trid AND language_code = 'es' ) = 0 ) OR ( ( SELECT COUNT(element_id) FROM wpwd_icl_translations t2 JOIN wpwd_posts p ON p.id = t2.element_id WHERE t2.trid = t.trid AND t2.language_code = 'es' AND ( p.post_status = 'publish' OR AND p.post_type='attachment' AND p.post_status = 'inherit' ) ) = 0 ) ) ) ) ORDER BY p.post_date DESC LIMIT 1

    Show all