Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search users by Country

  • @ukfish1

    Participant

    Hi

    We want to be able to find out how many members we have from each country.

    When I search the main members page for example, for USA, it brings up all sorts of results for users not associated with the country searched for.

    Chewers

    paul

Viewing 3 replies - 1 through 3 (of 3 total)
  • @ukfish1

    Participant

    Hi

    Sorry, can anyone help with this please.

    Thanks

    Paul

    @emaralive

    Moderator

    If you are referring to the “built-in” search form on the Members directory page, it searches all xprofile fields that have entries in the bp_xprofile_data table, as well as, the “users table” (“user_login” or “user_nicename”) for the given search term. Additionally, the query is based on the “Like” operator with a “wildcard” (%) in front and after the search term, e.g., LIKE '%" . $searh_term . "%'".

    In essence, a word such as “usable” will return as a hit for a search term of “usa”. So, what you will, most likely, want is a more advanced search capability 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.
    • Give the BP Profile Search plugin a try to see if it fits your needs.

    Other than the above examples, there are available commercial plugins that you should be able to find on you own.

    @ukfish1

    Participant

    Thanks

    BP profile search worked great for us

    Paul

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search users by Country’ is closed to new replies.
Skip to toolbar