• Resolved chinatownlee

    (@chinatownlee)


    Hi Greg,

    any idea how could I export Buddypress user data, specifically users that have at least 1 advert running on my classifieds website? This would help creating personalized marketing communication.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    You can get a list of user IDs with at least one active Advert by running the query below from phpMyAdmin

    
    SELECT post_author, user_email, COUNT(*) as <code>active_ads</code> FROM wp_posts INNER JOIN wp_users ON wp_posts.post_author = wp_users.ID WHERE post_type = 'advert' AND post_status = 'publish' GROUP BY post_author;
    

    This query will return the list of user IDs, user email and the number of active Ads the user has, something like this

    
    post_author | user_email           | active_ads
    ------------+----------------------+-----------
    1           | [email protected]     | 3
    11          | [email protected] | 1
    
    
    Thread Starter chinatownlee

    (@chinatownlee)

    Thanks, Greg.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Exporting users’ is closed to new replies.