Created
December 6, 2018 05:34
-
-
Save andrewlimaza/794f6fd24b05cb6b0bde33610ff20a2a to your computer and use it in GitHub Desktop.
SQL to get all users with active membership level.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT users.*, members.membership_id, level.name | |
FROM wp_users AS users | |
JOIN wp_pmpro_memberships_users AS members | |
ON users.ID = members.user_id | |
JOIN wp_pmpro_membership_levels AS level | |
ON members.membership_id = level.id | |
WHERE members.status = 'active' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, how can I call this consultation or course by the identified user - sensei lms? I am using a professional paid subscription, and for your consultation can filter users from the same association, but this association wants to know which courses to complete