When you have queries like this the best solution is to make a VIEW in phpmyadmin or any other database management system and see if it is returning the desired result. If it is returning the desired result you can use that input for Add from data source option when creating the tables.
I would like to display a table of current and future events with a query such as this:
SELECT * FROM wp_hkis_wpdatatable_1 WHERE enddate >= CURDATE()
but when I press "Save", I get a white screen with just
Thu, 15 Jun 2017 14:17:31 GMT
and the query is NOT saved. How can I structure a query that is acceptable to wpDataTables and will only display current events?
Hi LarryDaniele,
Thank you for your purchase.
When you have queries like this the best solution is to make a VIEW in phpmyadmin or any other database management system and see if it is returning the desired result.
If it is returning the desired result you can use that input for Add from data source option when creating the tables.
Best regards.
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
Thanks, Bogdan. Good advice, I can do that. Maybe some note or link about the restrictions to the query would be helpful.
I just added a query with CURDATE that works, so I can confirm this is not problem with the plugin:
SELECT * FROM db1.table1 WHERE datetime1 BETWEEN CURDATE()-INTERVAL 1 WEEK AND CURDATE()