There are actually a few reasons why searching or filtering won't work with SQL query based tables. Could you please show me your query, so I can guide you in the right direction?
Below are the SQL statements for creating my database:
CREATE TABLE IF NOT EXISTS `04_2019 date la 2 Hz` ( `ID` int(20) NOT NULL AUTO_INCREMENT, `Data` date DEFAULT NULL, `Timp` varchar(20) DEFAULT NULL, `X` varchar(20) NOT NULL, `D` varchar(20) NOT NULL, `Z` varchar(20) NOT NULL, PRIMARY KEY (`ID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `04_2019 date la 2 Hz` (`Data`, `Timp`, `X`, `D`, `Z`) VALUES ('$data','$timp','$X','$D','$Z');
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.
Hi,
I Set up my databese to be a server side processing DB as i seen in this tutorial: https://wpdatatables.com/documentation/creating-wpdatatables/creating-mysql-based-wpdatatables-with-server-side-processing/
After that i set my filters like here:
https://wpdatatables.com/documentation/table-features/advanced-filtering/
But any value i set for the filter, always i receive No matching records found.
Can you help me?
All best,
Valeriu
Hello Valeriu.
Thank you for your purchase.
There are actually a few reasons why searching or filtering won't work with SQL query based tables. Could you please show me your query, so I can guide you in the right direction?
Best regards.
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
Hi,
Below are the SQL statements for creating my database:
CREATE TABLE IF NOT EXISTS `04_2019 date la 2 Hz` (
`ID` int(20) NOT NULL AUTO_INCREMENT,
`Data` date DEFAULT NULL,
`Timp` varchar(20) DEFAULT NULL,
`X` varchar(20) NOT NULL,
`D` varchar(20) NOT NULL,
`Z` varchar(20) NOT NULL,
PRIMARY KEY (`ID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO `04_2019 date la 2 Hz` (`Data`, `Timp`, `X`, `D`, `Z`)
VALUES ('$data','$timp','$X','$D','$Z');
I attached also the data collected from 1 day.
http://safespace.wplancer.ro/_safespace/04_2019_date_la_2_Hz.sql
Many Thanks!,
B.
Hi again Valeriu.
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 let me know if this works.
Best regards.
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
Alright, baleavaleriu.
I hope everything does go well.
If you have any more issues or questions feel free to open a new ticket, we will gladly help.
Best regards.
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