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!
Hello,
I am not getting to use placeholders in my PHP code. I have a query which works perfectly without it, but when I try to integrate the placeholder %CURRENT_USER_ID% I am getting errors. I have reviewed the documentation but I didn't find a full example.
Could you please help me with this issue?
The query in PHP:
$cats = $wpdb->get_results("select distinct(category_id)
from view_eudp_stats_answers
WHERE exam_id in ($exam_ids) and
user_id = %CURRENT_USER_ID%");
The error:
Thanks in advance.
Regards,
Iban.
HI Iban,
Thank you for your purchase.
When you have queries like this our suggestion is to make a VIEW in phpmyadmin or any other database management system and see if it will return the right results. if the result is good you can use that query as an input ( SELECT * FROM VIEW_NAME ) and then add a placeholders.
Best regards.
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
Hi Bogdan,
I think you are responding to another quetion :) Please, could you check the question of this thread?
Thanks in advance.
Regards,
Iban.
Hi Iban,
Sorry for this, it looks like I pasted something from other ticket.
Do you have any live example of this or on your site so I can take a look and give you my suggestion.
Best regards.
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
Hi,
eFor examplo, I have this code in my php file that I am using as datasource. I am returning a seralized array, everything works correct, but I need to put a placeholder for the logged user id; I also need another placeholder ('var1', for example) for the exam ids.
The code is the same I posted the first time, which other information do you need? The use case is the one I have explained, and it is a common use case in your plugin... Please, let me know.
$cats = $wpdb->get_results("select distinct(category_id)
from view_eudp_stats_answers
WHERE exam_id in ($exam_ids) and
user_id = %CURRENT_USER_ID%");
Please, do you have an example about how do I have to implement a placeholder in a custom query in my php file, which I use as datasource.
NOTE: What I am renderizing is a chart.
Thanks in advance.
Regards,
Iban.
Hi Iban,
Sorry for late response we are in the middle of releasing the new product.
As for your case instead of CURRENT USER ID if you want to get the ID you can call this function
$currentUserId = get_current_user_id();
$cats = $wpdb->get_results("
SELECT DISTINCT (category_id)
FROM view_eudp_stats_answers
WHERE exam_id in ($exam_ids) AND
user_id = $currentUserId");
For user_id you can check the WordPress method on this link
But unfortunately using placeholders like VAR1 etc is something that is not possible to achieve with the plugin built in features at the moment.
Best regards.
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