Created
September 13, 2012 18:30
-
-
Save uprise10/3716486 to your computer and use it in GitHub Desktop.
Search users in WP
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
SELECT nw_users.ID, | |
nw_usermeta.meta_key, | |
nw_usermeta.meta_value, | |
nw_users.user_login, | |
nw_users.user_email | |
FROM nw_usermeta INNER JOIN nw_users ON nw_usermeta.user_id = nw_users.ID | |
WHERE ( | |
nw_usermeta.meta_key = 'first_name' | |
AND nw_usermeta.meta_value LIKE '%bas%' | |
) | |
OR( | |
nw_usermeta.meta_key = 'last_name' | |
AND nw_usermeta.meta_value LIKE '%bas%' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment