Okay
  Public Ticket #1088700
URL parameters for filtering
Closed

Comments

  •  1
    p4nthere started the conversation

    Hello.

    I have a project with a large database (every year database increased about 900.000 columns * row), so i'm looking for the best way to search in specific columns.

    I try URL parameters for filtering, but i see that the filter applied after the table selected and drawing in browser. So rather to make it faster it's slower.   

    1. What is the best way to handle this problem;

    2. Can i use variables (placeholders) with URL parameters;

  •  1,695
    Miloš replied

    Hi p4nthere,
    Thank you for your purchase.

    Do you try to search filter table before you show it on the page or after.
    |f you want to filter before show it, you can use default values in that columns, be aware that it will populate editor input type if it is active.
    If not please describe me more what are you trying to achieve because I did not quite understand.
    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  •  1
    p4nthere replied

    Hello Bogdan.

    I will describe my project.

    I have two tables (athlete ranking and athlete detail),  i retrieve the data with mysql without editor input active and server side processing enabled.

    I have a page with table athlete ranking, in that table in every athlete row i generate an URL for the page with table athlete detail and pass with filter the athleteID (mysite.com/?wdt_column_filter[athleteID]=xxxxx).

    With the above approach my problem is that the URL filters is filtering the table AFTER the table selected and displayed in the browser, this spends resources and adds extra display delay without a reason, i only need to show a specific athlete detail ID (one line). 

    A possible solutions is to pass throw the URL the variable (placeholder) althleteID, and in the select query use that variable let say select * from athlete Detail where athleteID=xxxxx, it is possible?

    If this is not possible is there any other way (with or without URL link in table athlete ranking) to select only a specific row in table without showing all the table, please have in mind that the table have about 900.000 (columns * row) and it's doubled every year.

  •  1,695
    Miloš replied

    Hi p4nthere,

    Sorry for late response we were busy releasing the new update and it took me some time to figure it out what are you trying to achieve.

    Unfortunately something like that is not possible out of the box but it requires some advanced custom coding. 

    I can give you some suggestion how to do it but I can not do it because it is not in our support policy.

    You have to grab Athlete ID when you click on his row. To achieve something like that you'll have to have Athlete ID column in Athlete table(ranking or detail). You can easily hide that column after if you don't want to users see Athlete ID values. With some jQuery snippet you'll have to get the ID and pass it with $_POST or $_GET to redirected page. 

    Redirected page should have Custom Page Template where you will add wpDataTable shortcode with do_shortcode() WordPress function. When you get the value that you passed from the front-end then you can use Placeholders. That events table should be MySQL based table where you'll use value that you passed as variable.

    We can offer you our paid customization service to hire one of our developers to implement this functionality for you. Our price is 50$/hour so if you are interested let us know.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables