• Resolved simplifydata

    (@simplifydata)


    I can successfully use the select endpoint to retrieve rows from my tables. Now I want to filter the results. I’m pretty sure I need to use the search_columns and search_column_fns parameters, but I cannot figure out the syntax and I can’t find any documentation. Everything I try just results in all rows being returned. That table has 700k rows, so that’s not really an option!

    Specifically, I’m querying a table called wp_give_donationmeta. I need to find all rows where meta_key=”_give_payment_form_id” and meta_value=342749.

    The SQL query would be:
    select donation_id from wp_give_donationmeta where meta_key=”_give_payment_form_id” and meta_value=342749;

    What I’ve tried:
    search_columns: {“meta_key”: “_give_payment_form_id”, “meta_value”: 342749}
    search_column_fns: {“meta_key”:” = “, “meta_value”: ” = “}

    Also tried: ” = “, “like”, ” like “, “equal”, “equals”, and finally tried just leaving that parameter out entirely.

    More generally, where do I find documentation about how to construct complex filters, which might have several ANDs and ORs?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Contributor Kim L

    (@kimmyx)

    Hi @simplifydata,

    Thanks for the post! We responded to your ticket regarding this.

    Could you take a look?

    Thank you! 🙏

Viewing 1 replies (of 1 total)

The topic ‘Rest API select filter syntax’ is closed to new replies.