Okay
  Public Ticket #3423700
Advanced Search
Closed

Comments

  • Adam started the conversation

    Search stops working when advanced search is enabled, works fine with server side processing turned off. However I have 3000+ records. What do I have to do the query so the search will work. Right now with Server Side processing turned on it shows no data found, but with it off it always finds it.

  •  1,819
    Miloš replied

    Hi Adam,

    Could you show me the SQL Query that was used for this table - and I can advise if maybe some small modification/correction is needed to get the search to work?

    -

    But you can also check these points to save time if you wish.

    Our logic is based on a PHP SQL parser which has full support for the SQL dialect for the following statement types

    SELECT, INSERT, UPDATE, DELETE, REPLACE, RENAME, SHOW, SET, DROP, CREATE INDEX, CREATE TABLE, EXPLAIN and DESCRIBE.

    Some of them are disabled for security reasons.

    Filtering, sorting, and search may not work properly if you include:

    • Accent graves ( ` ) around the table name
    • JOIN functions
    • UNION functions
    • CONCAT functions
    • sub-queries

    -

    So, first you can check for accent graves around the table name, if you have this, remove it...

    Then, see if you used CONCAT to create any column.

    If so, go into this column setting, and disable it from "global search" in the Filtering tab.

    -

    7138515403.png

    -

    If none of that helps,

    you can try preparing a MySQL view (which will return the data that you need, call it e.g. “view1” and then build a wpDataTables based on a simple query like "SELECT * FROM view1″.

     If you need help with that, you can see our video, where we show an example of using View in our plugin.

    -

    Let me know If that helped, and i can take a look at the Query, as well.

    Thank yousmile.png


    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

  • Adam replied

    That fixed it, I had "Accent graves ( ` ) around the table name" in the query.

    Query : SELECT `id`, `first_name`, `last_name`, `type`, `email`, `tel`, `field_3071`,   FROM ` contacts`

  •   Miloš replied privately