get_results("SELECT blog_id, domain, path FROM $wpdb->blogs WHERE public= 1"); foreach( $active_blogs as $blog ) { $post= $wpdb->get_results( "SELECT ID, post_author, post_date, post_modified, post_title, post_content FROM $wpdb->base_prefix" . $blog->blog_id . "_posts WHERE post_status= 'publish' AND post_type != 'revision' ORDER BY post_date DESC LIMIT 1" ); $newest[]= $post; } usort( $newest, array( $this, 'date_sort' ) ); return $newest; } function date_sort($a, $b) { $a = $a->post_date; $b = $b->post_date; if ( $a == $b ) { return 0; } else { return ( $a > $b ) ? -1 : 1; } } } ?>