Hey everyone!
With the holiday season upon us, we want to share our upcoming working hours:
- New Year: Our team will be off on January 1st and 2nd. We’ll be back on Friday, January 3rd, to respond to any messages received during this time.
- Weekend: As usual, we don’t work on weekends, so January 4th and 5th will also be non-working days.
- Orthodox Christmas: Our office will be closed on Monday and Tuesday, January 6th and 7th for the holiday.
After that, we’ll return to our regular schedule and assist you as quickly as possible.
In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find tons of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel), which might just have the answers you need while we’re away.
Thanks a bunch for your understanding and support!
Warm regards and happy holidays!
TMS
I need to be able to pass an input parameter to my query. The plugin doesn't support calling stored procs, and I can't pass an input parameter to a view, so what are my options? I don't want my query to live in the plugin, I want it in my DB. Thanks
Hi Jereme,
Yes, you won't be able to create a new SQL VIEW in your Database through our Plugin, and our SQL Queries are not able to make a new Table in the DB as you know.
All the data from each SQL Query table is stored as JSON Data as part of 'wp_wpdatatables' and 'wp_wpdatatables_rows'.
Also as you said, you can call your pre-made VIEW in our SQL Query Tables like "SELECT * FROM VIEWName", but we can't pass an input parameter through the Plugin inside that VIEW directly.
If you need to have a dynamic SQL Query Table which can change the Query with a parameter from a Page,
1. I will first share one example we got before from our Developers, they said this can be used for custom Dynamic Placeholders of SQL Query Tables.
We don't have this built-in yet, but you can with a workaround. Please note that this does require some experience with writing SQL queries and using WP hooks.
You can create a table with a query like this:
Then, on your_custom_page you will insert a shortcode of the table ID that you need, with a placeholder like this:
[wpdatatable id=1 var1=1]
The second table would be created from a query like this:
After that, you can use a hook for dynamic placeholders:
I hope this helps you achieve the results that you need.
2. Another custom example, in this case the scenario was to use PHP or API to dynamically change the Query of a Table on a page.
You can take a look at our available filters for developers here ;
https://wpdatatables.com/documentation/information-for-developers/filters/
-
Our devs pointed out this one :
wpdatatables_filter_mysql_query( $query, $tableId )
because you can use that to manipulate the Query.
There is also an option with Placeholders,
but combining these two or perhaps even just by using that hook/filter,
you might be able to achieve this use-case.
We do like to give more exact examples for certain solutions, but for this use-case, we, unfortunately, don't have anything yet, so at this time you can only try to make a custom solution to make this work.
I hope this helps.
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