Holiday Notice – Support Unavailable on April 18 and April 21
We just wanted to let you know that our support team will be offline on Friday, April 18th (Good Friday) and Monday, April 21st (Easter Monday) due to the holidays.
We'll be back on Tuesday, ready to assist you!
In the meantime, if you need any help, feel free to:
-
Use the support widget in the bottom right corner on our websites (Amelia and wpDataTables) — our latest AI-powered assistant is there 24/7 to help with basic and intermediate questions,
-
Browse our detailed documentation (Amelia, wpDataTables)
-
Explore helpful articles,
-
Or check out our YouTube channels for video guides!
Amelia YouTube Channel
wpDataTables YouTube Channel
Thank you for your understanding, and we wish you a wonderful holiday weekend!
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