Hello,
i'm trying to query all posts that are pages and published but NOT Page Number (ID) 21 or 153.
My Query looks like that:
$getcats = $wpdb->get_results("SELECT * FROM $wpdb->posts WHERE $wpdb->posts.post_type = 'page' AND $wpdb->posts.post_status = 'publish' AND $wpdb->posts.ID != 21,153 AND $wpdb->posts.post_parent = '0' ORDER BY menu_order ASC ");
The problem is: It works with either ID 21 OR ID 153, but it doesn't work with both numbers at the same time.
How can i exclude those two IDs out of the query?
Thanks in advance for your answers!