Top Commenters: exclude admin

Extend the WHERE clause:

WHERE
    comment_author_email != "" 
    AND comment_author_email != "YOUR_MAIL_ADDRESS" 
    AND comment_type = "" 
    AND comment_approved = 1 
)

If you want to exclude multiple email addresses, use the NOT IN operator and a comma separated list of strings:

AND comment_author_email NOT IN ( "[email protected]", "[email protected]" )

Leave a Comment