• Is there any way that I can run a query to filter the users in my database by number of posts. Then I can do an export.

    Any advice will be appreciated.

    Thanks.

Viewing 1 replies (of 1 total)
  • I think this is what you want:

    SELECT u . * , SUM( 1 ) AS numposts
    FROM wp_users u, wp_posts p
    WHERE p.post_author = u.ID
    AND p.post_type = 'post'
    AND p.post_status = 'publish'
    AND p.post_date < NOW( )
    GROUP BY u.ID
Viewing 1 replies (of 1 total)
  • The topic ‘Filter MySQL users by posts’ is closed to new replies.