Created
February 12, 2015 20:07
-
-
Save JudeRosario/569d1e7e552fe71c5e56 to your computer and use it in GitHub Desktop.
Membership Pull List from DB
This file contains 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
global $wpdb; | |
$heroes = $wpdb->get_results(" | |
SELECT `ID` , `sub_id` , `level_id`, `user_email` , `user_login` , `display_name` | |
FROM `wp_m_membership_relationships` | |
INNER JOIN `wp_users` ON wp_m_membership_relationships.user_id = wp_users.ID | |
WHERE `level_id` = 1 AND `sub_id` = 2 "); | |
foreach ($heroes as $hero) { | |
// Do stuff here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment