Okay
  Public Ticket #2894460
Filtering doesn't seem to be working
Closed

Comments

  • Brilliant Web Works started the conversation

    I am working on a client site that requires filtering of the table and was testing to learn how it works so I can tell them if I can do it or not. The filtering isn't working for some reason. https://share.getcloudapp.com/4guPDKGA

    I have created the table using query from WordPress table.

  • [deleted] replied

    Hi there

    Thank you for reaching out to us.

    If your MySQL-query based wpDataTable doesn’t work correctly with server-side processing, probably this is happening because wpDataTables server has problems with parsing of the query and building new queries dynamically (rarely happens, but does sometimes). To avoid this please prepare a MySQL view (a stored query), which will return the data that you need, call it e.g. “view1” and then build a wpDataTabled based on a simple query like “SELECT * FROM view1″.

    Please note some this when working with the server-side processing feature:

    • Please do not use “LIMIT” in the SELECT statement. wpDataTables adds it automatically and it will be overridden.
    • Please do not use “ORDER BY” in the SELECT statement. wpDataTables has its own sorting engine so it makes no sense to use MySQL’s sorting, since it will be overridden. Also, server-side processing feature adds this part of statement automatically when users trigger the sorting on the front-end, and having it in initial statement may cause the table to crash.