I have a query below that is working, however I need more information from different tables.
Can someone help or show me how to add additional tables to the query?
The fields I need are first and last names, along with 2 other fields in the s2member custom fields. My end result would be to have only the users where the meta_value is equal to executive board and then list only those members out on the page. There are 3 total now and the query is showing those 3 in my for each, but I need additional data.
$users = $wpdb->get_results ("SELECT * FROM `" . $wpdb->usermeta . "` WHERE `meta_key` = '" . $wpdb->prefix . "s2member_custom_fields' AND `meta_value` REGEXP '.*\"member\";s:[0-9]+:\"executive board\".*'");