Okay
  Public Ticket #2800196
filter doesn't work
Closed

Comments

  • alexander started the conversation

    hello! filter doesn't work, i'm doing as to the tutorials (it seems to me so) but never the less it doesn't work at all. when i'm trying to use filter the hole table disappears & returns after cancelling the filtrationan

  • [deleted] replied

    Hi Alexander

    Thank you for reaching out to us.

    Could you please tell us how was the table created and send us the source file so we can try and recreate the issue on our end? Do you have the same issue on the backened? Could you send us a link to the frontend where we can see this behavior? 

  • alexander replied

    Hi

    the table was created with "Generate a query to the WordPress database." option using posts, for filtration i've tried to use post-category (rubric) & custom fields, but without any result. Backend & frontend behave in the same manner.

    https://flexoprom.work/products-page-vt1/

  • [deleted] replied

    Hi Alexander

    Please note that this tool is not an ultimate query generator. It simply constructs a suggestion of a query. We are constantly working to improve it, but SQL is such a complicated and flexible language that full automation for constructing queries is next to impossible. This tool often returns a complicated query so 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.