As previously announced via banners and our newsletters, support is no longer available through this platform.
For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.
You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.
Paid customers: Please log in to your store account for support.
Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com
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