Support » Networking WordPress » query comment author url

  • i am trying to get out all the comment author emails for doing a competition, the one that comments the most in the next 30 days win a price. but i cannot get all the emails outputted. the best would be if it was printet to a txt file or screen.

    can anyone help me with this?
    i am making graphs in excel

    <?php
    	global $wpdb;
    
    	// Query all blogs from multi-site install
    	$blogs = $wpdb->get_results("SELECT blog_id FROM wp_blogs ORDER BY blog_id");
    
    	foreach( $blogs as $blog ) {
    		// Query for comment_author_email from comments table
    		$eposts = $wpdb->get_results("SELECT <code>comment_author_email FROM
    wp_".$blog->blog_id ."_comments");
    		foreach( $eposts as $epost ) {
    print_r($eposts);
    			// Create list
    			echo $epost->option_value;
    		}
    	}
    ?>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘query comment author url’ is closed to new replies.