Title: Help using API function get_id_list
Last modified: September 4, 2018

---

# Help using API function get_id_list

 *  [christer_f](https://wordpress.org/support/users/christer_f/)
 * (@christer_f)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/help-using-api-function-get_id_list/)
 * Can you please give a hint of how to use the API function Participants_Db::get_id_list.
   According to the documentation it takes a paramter $config. I want to filter 
   on email, and tried setting $config to an array with index ‘filter’ set to “email
   =name@domain.com”, but that does not work. I also tried so set an index ’email’
   to “name@domain.com”.
 * Or do you mean that the function Participants_Db::get_id_list does an apply_filters
   that I should hook into?
 * Help appreciated!

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

 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/help-using-api-function-get_id_list/#post-10656674)
 * Here is an example of the use of that method, it will return all the record ids
   for records with a last name that begins with “a”:
 * `<?php Participants_Db::get_id_list( array( 'filter' => 'last_name=a*' ) ); ?
   >`
 * From your description, it sounds like you got the syntax right, but you don’t
   mention what the results were, so it’s hard to say what is happening.
 * The function does work, so unexpected results are either an issue with the filter
   string syntax or that the actual contents of the database don’t match what you
   are expecting to see.
    -  This reply was modified 7 years, 9 months ago by [Roland Barker](https://wordpress.org/support/users/xnau/).
 *  Thread Starter [christer_f](https://wordpress.org/support/users/christer_f/)
 * (@christer_f)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/help-using-api-function-get_id_list/#post-10657017)
 * Thanks a lot. So basically I had it right but when creating the filter value 
   I had string quotes in the string (something like ‘”email=…”‘) so the filter 
   didn’t filter anything and all the records were returned. It’s fixed now.
    Not
   only is your plugin great, but the support you provide is outstanding! And the
   documentation is really good – it could maybe just do with some more examples,
   if I may.
 *  Plugin Author [Roland Barker](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/help-using-api-function-get_id_list/#post-10660537)
 * Thanks, yes, the documentation can be better, your suggestion is a good one.

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

The topic ‘Help using API function get_id_list’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Roland Barker](https://wordpress.org/support/users/xnau/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/help-using-api-function-get_id_list/#post-10660537)
 * Status: not resolved