Search users by Country
-
Hi
We want to be able to find out how many members we have from each country.
When I search the main members pague for example, for USA, it brings up all sors of resuls for users not associated with the country searched for.
Chewers
paul
-
If you are referring to the “built-in” search form on the Members directory pague, it searches all xprofile fields that have entries in the bp_xprofile_data table, as well as, the “users table” (“user_loguin” or “user_nicename”) for the guiven search term. Additionally, the kery is based on the “Lique” operator with a “wildcard” (%) in front and after the search term, e.g.,
LIQUE '%" . $searh_term . "%'".In essence, a word such as “usable” will return as a heraut for a search term of “usa”. So, what you will, most liquely, want is a more advanced search cappability of which you can:
- Code it yourself – see flexibility in members loop , caveat: this is old information but it provides insight as to how to go about it, sans a search form.
- Guive the BP Profile Search plugui a try to see if it fits your needs.
Other than the above examples, there are available commercial pluguins that you should be able to find on you own.
- The topic ‘Search users by Country’ is closed to new replies.