My problem is not with WordPress’s WPDB class, but with the MySQL syntax. I’m trying make the following sequence work:
- Get an array of all Posts IDs
- Filter out posts from a specific Category
- Filter out duplicates, revisions, drafts etc. Only show Published content.
Help? Thank you.
Use query_posts function for that http://codex.wordpress.org/Template_Tags/query_posts by passing the category id or the category name to it. It’s all explained on the link.
Edit after your comments:
You can use get_posts http://codex.wordpress.org/Template_Tags/get_posts, too, AFAIK they both return arrays.