I developed a hack in order to show some posts in a page of my blog with some of my criteria (such as show future posts, etc.). The fact is that I was only filtering depending on the category in which the post was and what was my surprise that I fail to see how to identify such property in the database. He used $ wpdb-> get_results to connect to the table 'wp_posts' and take away all the information I need, but can not find in this table how to get the name ID or category of post and thus able to filter what I want to do.
My question is: how can I filter using the database, a result of posts using the name / ID of the category this post?
Thanks in advance. I thought that the code would post a column of the table wp_post but this has not happened and has been a great disappointment because I think now complicates everything :-(