Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
WordPress: MySQL query to list user names, emails, and first & last name
SELECT wp_users.user_login, wp_users.user_email, firstmeta.meta_value as first_name, lastmeta.meta_value as last_name FROM wp_users left join wp_usermeta as firstmeta on wp_users.ID = firstmeta.user_id and firstmeta.meta_key = 'first_name' left join wp_usermeta as lastmeta on wp_users.ID = lastmeta.user_id and lastmeta.meta_key = 'last_name'
@emarty29
Copy link

emarty29 commented Jul 14, 2020

Thanks!

@LucaRosaldi
Copy link

LucaRosaldi commented Nov 23, 2020

Thank you pal

@justinwyllie
Copy link

justinwyllie commented Mar 23, 2021

Thanks!

@utsukushiihime
Copy link

utsukushiihime commented Jun 24, 2021

Thank you!

@VegasWebsiteDesigns
Copy link

VegasWebsiteDesigns commented Jul 17, 2021

Thank you, very helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment