• 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 protected]”, but that does not work. I also tried so set an index ’email’ to “[email protected]”.

    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

    (@xnau)

    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.
    Thread Starter christer_f

    (@christer_f)

    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

    (@xnau)

    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.