I'm trying to run a query from the main sites post table onto the sub site, but I think how the table prefixes are set is screwing with me a bit. I figure if I wanted to query the from different blogs I would just use the prefixes like so.
Mainsite: SELECT $wpdb->posts.*
Blog 2: SELECT $wpdb->2_posts.*
But it turns out when I run this query on blog 2 I get the posts from that site:
$querystr = " SELECT $wpdb->posts.* FROM $wpdb->posts WHERE $wpdb->posts.post_type = 'post' AND $wpdb->posts.post_status = 'publish' ORDER BY $wpdb->posts.post_date DESC ";
Any ideas how to achieve what I want without the use of switch_to_blog();
Thank you for your help!