Title: Search Problem
Last modified: August 21, 2016

---

# Search Problem

 *  Resolved [alexdex](https://wordpress.org/support/users/alexdex/)
 * (@alexdex)
 * [13 years ago](https://wordpress.org/support/topic/search-problem-8/)
 * Hi, i use your plugin from version 1.3.7 and it is fantastic. So i use now the
   latest version in a new wordpress installation without other plugin and dafault
   theme and i have a strange search problem.
    I use normal shortcode:
 * [pdb_list fields=”name, lastaname, private_id, email” search=”true” sort=”true”
   display_count=”true”]
 * The search dropdown show all my db field (about 20)but if i search alex like 
   name, i have the correct records, if i search alex in the lastname dropdown search
   i have 0 found record (CORRECT) but if i search alex in zip for example or all
   the other dropdown search field that i not include in my shortcode, i have 1000
   records found (all my records) and not 0 results that it is correct.
 * How can i fix? I used old version and function perfect
 * Please help me
 * Thanks a lot
 * [http://wordpress.org/extend/plugins/participants-database/](http://wordpress.org/extend/plugins/participants-database/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Thread Starter [alexdex](https://wordpress.org/support/users/alexdex/)
 * (@alexdex)
 * [13 years ago](https://wordpress.org/support/topic/search-problem-8/#post-3693190)
 * Hi, somebody can help me?
    I reinstall wordpress, i reinstall only this plugin
   using normal theme and i have again this search problem on frontend. The backend
   function perfect. So it is very strange, i have a dropdown search menu that give
   the right results only with the same field that i include in my shortcode. For
   example if i have: [pdb_list fields=”name, lastaname, private_id, email” search
   =”true” sort=”true” display_count=”true”] I search Alex in name dropdow, the 
   result is correct, if i search Alex in lastname dropdown the result is 0 (correct),
   if i search alex in email field the result is 0 (correct) but if i search alex
   in city dropdown list field the result put all my data: 1000 results found! If
   i add city in my shortcode fuction well and show me 0 result.
 * Please help me
 * Thank you
 *  [PayBas](https://wordpress.org/support/users/paybas/)
 * (@paybas)
 * [13 years ago](https://wordpress.org/support/topic/search-problem-8/#post-3693196)
 * I think it’s a bug in the plugin, but you could do this:
 * If you set the “display column” to 0 for “city” in the “manage database fields”
   admin page, it should disappear from the search field dropdown.
 *  Thread Starter [alexdex](https://wordpress.org/support/users/alexdex/)
 * (@alexdex)
 * [13 years ago](https://wordpress.org/support/topic/search-problem-8/#post-3693198)
 * Thank you for your answer.
    I am sure that it is not a plugin bug because i use
   in another my website the version 1.3.7 anf function perfect. So, i know that
   i could set “0” on display column of city field but my problem is that i have
   various search page and i cannot decide to populate dropdwon search menu in different
   way for different page. If i put 0 on city field, disappear everywhere! So i 
   have to show all my fields on dropdown search frontend menu. How can i solve 
   it?
 * Best
 *  [PayBas](https://wordpress.org/support/users/paybas/)
 * (@paybas)
 * [13 years ago](https://wordpress.org/support/topic/search-problem-8/#post-3693200)
 * It could be a bug introduced after 1.3.7 due to code changes.
 * What is the field type of “city”? Text line?
 * There are basically 2 ways to fix this:
    1) Only display search fields in the
   dropdown that are specifically passed/requested as shortcode attributes 2) Fix
   the search for non-display fields
 * The second one obviously would be better, but both will require code changes.
   Wish I could help 😉
 *  Thread Starter [alexdex](https://wordpress.org/support/users/alexdex/)
 * (@alexdex)
 * [13 years ago](https://wordpress.org/support/topic/search-problem-8/#post-3693201)
 * Hi, the field is text line. I am seroiuos thinking about a bug like you said.
   
   If i add city field in my shortcode function well like i explain before but i
   do not want to insert all the field in my shortcode (space problem). So, i have
   to try to solve the problem with your 2 suggestion or i need to come back to 
   older version but i do not want to make this solution. It is very strange that
   nobody speak about this.
 * Thanks for your answer
 *  [PayBas](https://wordpress.org/support/users/paybas/)
 * (@paybas)
 * [13 years ago](https://wordpress.org/support/topic/search-problem-8/#post-3693202)
 * I think you are the first to notice because I think most of us don’t use multiple
   different [pdb-list] shortcodes.
 * On my website for instance, I just use [pdb-list], with no attributes at all.
   I configure which columns to display by using the admin panel.
 * So many of us will not see this problem/bug until we start using multiple list
   shortcodes with different field displays.
 *  Thread Starter [alexdex](https://wordpress.org/support/users/alexdex/)
 * (@alexdex)
 * [13 years ago](https://wordpress.org/support/topic/search-problem-8/#post-3693203)
 * Ok, i understand.
    I hope to find a solution… Thank for your support
 *  Thread Starter [alexdex](https://wordpress.org/support/users/alexdex/)
 * (@alexdex)
 * [13 years ago](https://wordpress.org/support/topic/search-problem-8/#post-3693209)
 * Thanks a lot to Xanu for his support
 * Now Function Perfect
 * BEST
 *  [PayBas](https://wordpress.org/support/users/paybas/)
 * (@paybas)
 * [13 years ago](https://wordpress.org/support/topic/search-problem-8/#post-3693211)
 * Care to post the solution?
 *  Thread Starter [alexdex](https://wordpress.org/support/users/alexdex/)
 * (@alexdex)
 * [13 years ago](https://wordpress.org/support/topic/search-problem-8/#post-3693212)
 * Hi, i do not know wich file he modify but this bug fix will include soon in the
   next releae
 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [13 years ago](https://wordpress.org/support/topic/search-problem-8/#post-3693213)
 * You need to change two lines in PDb_List.class.php
 * Line 309 changes from:
 * `in_array($this->filter['search_field'], $this->display_columns)`
 * to:
 * `Participants_Db::is_column($this->filter['search_field'])`
 * Line 313 changes from:
 * `$search_field = Participants_Db::get_field_atts($this->display_columns[array_search(
   $this->filter['search_field'], $this->display_columns)]);`
 * to:
 * `$search_field = Participants_Db::get_field_atts($this->filter['search_field']);`

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Search Problem’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/search-problem-8/#post-3693213)
 * Status: resolved