I have a wpdatatable using an SQL query with server side processing enabled.
I also have filters enabled above the table. These filters use the 'selectbox', with search, that load from the values in the table. E.g. First column is first name, and as the user types a name, 10 options should load which they can select from.
Sample query:
SELECT * FROM member_awards WHERE award = "5 Years Service";
However, the addition of the "Where" in this query prevents the user from using the filters. Instead, they see "Unable to retrieve results". If I remove the where statement, then the filter's work as expected (but the wrong dataset).
Hi,
I have a wpdatatable using an SQL query with server side processing enabled.
I also have filters enabled above the table. These filters use the 'selectbox', with search, that load from the values in the table. E.g. First column is first name, and as the user types a name, 10 options should load which they can select from.
Sample query:
SELECT * FROM member_awards
WHERE award = "5 Years Service";
However, the addition of the "Where" in this query prevents the user from using the filters. Instead, they see "Unable to retrieve results". If I remove the where statement, then the filter's work as expected (but the wrong dataset).
Is there a fix for this?
Thanks in advance.
Hi, Jonathan
Thank you for your purchase.
- Try removing the semi-colon from the end and include the value in single quotes, like this:
The semi-colon is added programmatically, and there's no need to add it in the query.
Contact us further if still not resolved, please.
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