Hello, since recently, I think since the update to 5.4, I get an error message when including a SQL table (see jpg). If I connect the data with the help of a view, it works. I use MS SQL as data source. All old connections still work fine. Can you help me further? It's not a public website.
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
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.
-
-
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.
Hello, since recently, I think since the update to 5.4, I get an error message when including a SQL table (see jpg). If I connect the data with the help of a view, it works. I use MS SQL as data source. All old connections still work fine. Can you help me further? It's not a public website.
Attached files: 2023-03-16_10h38_00.jpg
Hi, Ronald.
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:
-
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.
-
-
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 you.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
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