Importing users to Buddypress with custom fields

I ended up writing a bunch of MySQL statements. My process went: Add users into wp_users. Add first name into wp_usermeta. Add last name into wp_usermeta. Add nickname into wp_usermeta. Add last activity into wp_usermeta. (This is important for BuddyPress; otherwise, users won’t show up in the members-loop) Add name to BuddyPress. Add custom “phone” … Read more

little help with a mySQL query to wp database

Following the recomendations of @toscho i had a look at get_results and the following edits to the function ended up doing the trick. if ( ! function_exists( ‘get_meta_values’ ) ) { function get_meta_values( $key = ”, $type=”post”, $status=”publish” ) { global $wpdb; if( empty( $key ) ) return; $r = $wpdb->get_results($wpdb->prepare( ” SELECT pm.meta_value, pm.post_id … Read more