If you're using SQL query, please note that complex queries may result in misbehavior of Filters, Search and Sorting.
Also, if you're including accent graves ( ` ) around table or column names, that can break the search as well.
Try creating a query like
SELECT * FROM myTable
Or, if the table is more complex than that, 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.
the table that works is a simple query, the one that doesn't work is something like "select * from myTable where myString! = '0' || myString2! = '0', I did a test and leave my query something like this" "select * from myTable where myString! = '0', and if it works and it seems that the problem is when I put the conditional OR (||), and another problem that I see in the solution that you give me, is that if I make a view, at the time of wanting to edit my table I will not be able to do it since it is not a table
I have two tables in one if it works and in the other it doesn't
Hello alan
How was that other table created?
If you're using SQL query, please note that complex queries may result in misbehavior of Filters, Search and Sorting.
Also, if you're including accent graves ( ` ) around table or column names, that can break the search as well.
Try creating a query like
SELECT * FROM myTable
Or, if the table is more complex than that, 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:
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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
the table that works is a simple query, the one that doesn't work is something like
"select * from myTable where myString! = '0' || myString2! = '0',
I did a test and leave my query something like this" "select * from myTable where myString! = '0',
and if it works and it seems that the problem is when I put the conditional OR (||),
and another problem that I see in the solution that you give me, is that if I make a view, at the time of wanting to edit my table I will not be able to do it since it is not a table
Hi again Alan
That is correct, with views, SQL Views cannot be edited properly – only one of the underlying tables can be edited if you pass the proper ID.
I've created multiple tables with OR functions that are working fine. Are "myString!" and "myString2!" columns?
Kind Regards,
Aleksandar Vuković
[email protected]
Rate my support
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia 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