I'd like to use the mini-loop on our home page in a few places to pull up lists of posts only from specific topics. I think I figured out the proper query logic, but I only 'speak' T-sql (I'm a asp.net person by day).
I'm not really sure how to turn the mini-loop query into something like this:
SELECT TOP 5 wp_posts.ID, post_Title FROM wp_posts INNER JOIN wp_post2cat ON wp_post2cat.post_id = wp_posts.ID INNER JOIN wp_categories ON wp_categories.Cat_ID = wp_post2cat.Cat_ID WHERE wp_categories.cat_ID = myVariable
with myVariable = the particular category ID I'm looking for.