Title: [plugin:Commenter Email] How to Display all commenters ??
Last modified: August 20, 2016

---

# [plugin:Commenter Email] How to Display all commenters ??

 *  Resolved [Vignesh Pichamani](https://wordpress.org/support/users/viky081/)
 * (@viky081)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/about-the-plugincommenter-email-plugin/)
 * I modified the Plugin Of commenter Email,I have a commenters data of about 54,
   But they display only 11! I really confuse what i did
    here is the mysql code
   of wordpress plugin, I need to display all the commenters emails(blank email 
   also ) here is the code
 *     ```
       public static function get_emails( $fields = array( 'comment_author_email', 'comment_author','comment_author_IP'), $output = ARRAY_N ) {
       		global $wpdb;
   
       		// comment_author_email must be one of the fields
       		if ( ! in_array( 'comment_author_email', $fields ) )
       			array_unshift( $fields,  'comment_author_email' );
   
       		$fields = implode( ', ', $fields );
       		$sql = "SELECT $fields
       				FROM {$wpdb->comments} t1
       				INNER JOIN ( SELECT MAX(comment_author) AS author FROM {$wpdb->comments} GROUP BY comment_author_email ) t2 ON t1.comment_author = t2.author
       				WHERE
       					comment_approved = '1' OR
       					comment_author_email != '' OR
       					(comment_type = '' OR comment_type = 'comment')
       				GROUP BY comment_author_email
       				ORDER BY comment_author_email ASC";
       		$emails = $wpdb->get_results( $sql, $output );
       		return $emails;
       	}
       ```
   
 * Anyone Much appreciated!

Viewing 1 replies (of 1 total)

 *  Thread Starter [Vignesh Pichamani](https://wordpress.org/support/users/viky081/)
 * (@viky081)
 * [13 years, 6 months ago](https://wordpress.org/support/topic/about-the-plugincommenter-email-plugin/#post-3209307)
 * Fixed…

Viewing 1 replies (of 1 total)

The topic ‘[plugin:Commenter Email] How to Display all commenters ??’ is closed 
to new replies.

 * 1 reply
 * 1 participant
 * Last reply from: [Vignesh Pichamani](https://wordpress.org/support/users/viky081/)
 * Last activity: [13 years, 6 months ago](https://wordpress.org/support/topic/about-the-plugincommenter-email-plugin/#post-3209307)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
