Hey everyone!
With the Labour Day holidays coming up, we’d like to let you know about our upcoming working hours:
Thursday, May 1st: Our team will be off during Labour Day.
Friday, May 2nd: We'll also be off for an extended holiday break.
We’ll be back on Monday, May 5th, ready to respond to all messages received during this time.
In the meantime, if you need help, feel free to:
-
Use the support widget on the bottom right of our websites (Amelia and wpDataTables) — our AI-powered assistant is available 24/7 and can help with many common questions.
-
Visit our documentation, articles, or YouTube channels for quick answers and step-by-step guides.
https://www.youtube.com/@AmeliaWordPressBookingPlugin/videos
https://www.youtube.com/@wpDataTables/videos
Thank you for being so understanding, and we hope you enjoy the long weekend!
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