A SQL Query to extract posts by category
-
Needed this and could not find it in the forums or codex anywhere. So, I wrote it and am posting it here for any one eho needs to create distict subblogs. Enjoy.
SELECT wp_posts.* FROM wp_posts
LEFT JOIN wp_post2cat ON wp_posts.id=wp_post2cat.post_id
WHERE wp_post2cat.category_id="35";PS: Substitute 35 for your own category ID.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘A SQL Query to extract posts by category’ is closed to new replies.