Page 1 of 1

Searching by custom fields

PostPosted: January 11th, 2012, 1:40 pm
by danc81
Firstly, great work on S2, it's extremely useful!

Now, I have a site which has a number of custom fields to be entered for various registration levels. Now, I want to display a list of users who have entered certain values into specific fields. I'm currently using a WP_User_Query to list all users, is there a way that I could use WP_User_Query or even a $wpdb->query() to perform a lookup on specific fields?

Thanks.

Re: Searching by custom fields

PostPosted: January 12th, 2012, 8:03 pm
by Raam Dev
Thanks for the KUDOS! :) Glad to hear you're finding the plugin useful!

Please see this thread regarding your questions: viewtopic.php?f=4&t=10099&p=60332#p60332

Re: Searching by custom fields

PostPosted: January 13th, 2012, 4:25 am
by danc81
Excellent, thanks for pointing me to that thread, the thread linked from the last post seems to have a solution using REGEXP. I'll give that a shot. After some digging around in the database I had come to the conclusion that a Regex of some sort would be the answer.

Thanks.

Re: Searching by custom fields

PostPosted: January 13th, 2012, 7:34 pm
by Raam Dev
You're welcome! :)