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 ') WHERE p.menu_order < '0' AND p.post_type = 'portfolio' AND p.post_status = 'pu' at line 1]
SELECT p.ID FROM wp_t68eqe_posts AS p INNER JOIN wp_t68eqe_term_relationships AS tr ON p.ID = tr.object_id INNER JOIN wp_t68eqe_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id AND tt.taxonomy = 'portfolio_category' AND tt.term_id IN () WHERE p.menu_order < '0' AND p.post_type = 'portfolio' AND p.post_status = 'publish' ORDER BY p.menu_order DESC 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 ') WHERE p.menu_order > '0' AND p.post_type = 'portfolio' AND p.post_status = 'pu' at line 1]
SELECT p.ID FROM wp_t68eqe_posts AS p INNER JOIN wp_t68eqe_term_relationships AS tr ON p.ID = tr.object_id INNER JOIN wp_t68eqe_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id AND tt.taxonomy = 'portfolio_category' AND tt.term_id IN () WHERE p.menu_order > '0' AND p.post_type = 'portfolio' AND p.post_status = 'publish' ORDER BY p.menu_order ASC LIMIT 1

Small text test