' .$options[1]->option_value.' »
'.$thispost[0]->post_title.'
'.$thispost[0]->post_content.'
get_col("SELECT blog_id FROM $wpdb->blogs WHERE last_updated >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) ORDER BY last_updated DESC"); if ($blogs) { foreach ($blogs as $blog) { // we need _posts and _options tables for this to work $blogOptionsTable = "wp_".$blog."_options"; $blogPostsTable = "wp_".$blog."_posts"; /* Options - ie. Blog URL & Name */ $options = $wpdb->get_results("SELECT option_value FROM $blogOptionsTable WHERE option_name IN ('siteurl','blogname') ORDER BY option_name DESC"); // we fetch the title and link for the latest post /* Post - ie. Title & GUID */ $thispost = $wpdb->get_results("SELECT post_title, guid, post_content, post_author FROM $blogPostsTable WHERE post_status = 'publish' AND post_type = 'post' AND post_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY) ORDER BY id DESC LIMIT 0,1"); // if it is found put it to the output if($thispost) { echo '
'; $counter++; } // don't go over the limit if($counter >= $how_many) { break; } } } } ?>