• Resolved chelminski

    (@chelminski)


    Hi ??
    I need help. I’ve read the documentation, but I can’t figure it out. I have account pages where I would like to display a log from the database. The link looks like this:
    https://example.com/user-details?user=chelminski

    I would like the search to look like this:
    Filter records where the “name” column is exactly the value “chelminski”

    So I tried doing something like this, although I’m not entirely sure what I’m doing – it doesn’t work.

    I can’t change the link, so I don’t want to add additional content to it (e.g. “?wpda_search_column_title” and similar). This is problematic for me.

    What can I do to make the table filter information based on URL arguments?

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

    (@kimmyx)

    Hi @chelminski,

    Please try the following in your WHERE Clause:

    name like if( httpGet['user'] is null, name, concat( '%', httpGet['user'], '%' ) )

    For exact values, please try:

    name = httpGet['user']

    Just a note, “name” is often a reserved column name, so you might see instances where you’ll see a 404 page instead. We suggest using more unique column names.

    We hope that helps! Let us know if you have other questions. ??

    • This reply was modified 7 months, 1 week ago by Kim L. Reason: typo
    • This reply was modified 7 months, 1 week ago by Kim L.
    Thread Starter chelminski

    (@chelminski)

    For example, I used the WordPress user table. I would like the table to show only one record of the user “chelminski”. I included the information in the link. Unfortunately, an error occurs.

    What else can I do to make this work? I care a lot ??

    Plugin Contributor Kim L

    (@kimmyx)

    Hi @chelminski,

    Are you currently using the free version of WPDA?

    Using URL parameters in the WHERE clause is currently limited to the premium version only. Please see: Using URL parameters in your default where clause

    We appreciate your understanding. ??

    Thread Starter chelminski

    (@chelminski)

    Hi @kimmyx

    I am using the premium version of the plugin. Unfortunately, the same error appears as before. Is there any way to make this work? ??

    Plugin Contributor Kim L

    (@kimmyx)

    Hi @chelminski,

    Thanks for the response!

    What version do you currently have? We currently have version 5.5.0 installed but the parameters also work on 5.4.0.

    See here: https://share.zight.com/NQuAk2xq

    We might need to take a closer look at your table. Could you send us a message at Contact | WP Data Access?

    We’ll wait for your email. ??

    Thread Starter chelminski

    (@chelminski)

    Hey ??

    I’m so sorry. In fact, my plugin has not been updated. Thank you very much for your help!

    Plugin Contributor Kim L

    (@kimmyx)

    Hi @chelminski,

    Thanks for the update!

    Feel free to create a new post if you have new questions. ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Dynamic URL filter’ is closed to new replies.