We're Moving to a New Support Platform – Starting June 1st!
We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.
You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.
While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.
We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.
Thanks for your continued support and trust – we’re excited to bring you an even better support experience!
Hi, I use complex queries, so after updating to wpDataTables 2.0 I had to create some views in MySQL. To prevent having to create many views I created a view which uses 2 variables in its SELECT statement. For this I used an example I found on stackoverflow.com
The example function:
and the view:
Then you can call a view with a parameter:
I tried this in phpMySQL and I got my view working, also I created a working query passing 2 variables to the view.
Next step I tried to copy the query to the wpDataTables (create a Table) where it looks like this:
However, when I press the save button in wpDatatables I get an error message:
Error
cannot calculate position of @aquaID within @aquaID:=2 a) ap, (select @pinID:=11 p) pp, week_gemiddelden_per_dag gm ORDER BY gm.datum
Is there any way to use functions in wpDataTables?
Hi Richard,
Thank you for your purchase/
Our recommendation when creating mysql tables is not to use functions like SUM, GROUP BY, ORDER BY, LIMIT , JOIN etc. You have a complicated query and my suggestion is to make a just a VIEW in phpmyadmin without any functions like
SELECT * FROM view_name
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables
Hi Milan,
thats the thing, i have created a view in mySQL. but to prevent me from having to create a whole bunch of views, I would like to pass a variable to the view.
SELECT * FROM [view_name] is not enough if you want to pass a variable to the view.
This is where my question comes in, i did manage to find a working solution using functions in mySQL, however this does not seem to work in wpDataTables.
Is there any way?
Hi Richard,
Sorry to disappoint you but unfortunately variables in mysql queries are not supported.
But you can use placeholders.
You can take a look at our documentation about placeholders here.
Kind Regards,
Isidora Markovic
wpDataTables: FAQ | Facebook | Twitter | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Amelia demo sites | Docs
You can try our wpDataTables add-ons before purchase on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables