• Resolved Make carlos

    (@make-carlos)


    $getAllSubscribers = $wpdb->get_results(“SELECT email FROM BeF_mailpoet_subscribers WHERE status = ‘subscribed'”);

    How can i get user by LIST ID ?

    I have total 3 types of list and each list have different users. I can’t see any specific field in table to get by list id

    Thanks
    Make

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Ojoma a11n

    (@geraltrivia)

    Hello there @make-carlos ,

    Thank you for reaching out to us.

    $getAllSubscribers = $wpdb->get_results(“SELECT email FROM BeF_mailpoet_subscribers WHERE status = ‘subscribed’”);

    How can i get user by LIST ID ?

    I have total 3 types of list and each list have different users. I can’t see any specific field in table to get by list id

    To retrieve subscribers by list ID, you can modify the SQL query to include a condition with the desired list ID. Here’s an example using the code you provided:

    $listID = 1; // Replace 1 with the actual list ID you want to retrieve subscribers from$getAllSubscribers = $wpdb->get_results("SELECT email FROM BeF_mailpoet_subscribers WHERE status = 'subscribed' AND list_id = $listID");

    Replace $listID with the actual ID of the list you want to retrieve subscribers from.

    Regarding your question about specific fields, the Mailpoet plugin stores the list ID information in a separate table or uses a different column name. You may need to refer to your MailPoet plugin’s database structure to find the correct field to filter by list ID.

    I hope this helps.

    Have a great day.

    Plugin Author Bruna a11n

    (@bruberries)

    Hi @make-carlos,

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Get subscriber by list ID’ is closed to new replies.