Conversation
supportI tried to run this query SELECT display_name FROM wp_users WHERE ID = '<?php $current_user->ID ?>' but it’s given this error: This SQL Query has not been allowed by an Administrator. Does anybody knows how to solve the problem?
You put this query into a shortcode without defining it as a report yet. This is a security feature to prevent other non-admin users from creating potentially relieving queries on a page or post that have not been allowed by the site administrator. All you have to do is copy and paste that exact query into a new report and save that report with a name, then that SQL can be used in a shortcode successfully.
Thank you! I have realized my mistake. WordPress is changing the formatting. I now insert the codes inside a Raw HTML Editor and it works
You put this query into a shortcode without defining it as a report yet. This is a security feature to prevent other non-admin users from creating potentially relieving queries on a page or post that have not been allowed by the site administrator. All you have to do is copy and paste that exact query into a new report and save that report with a name, then that SQL can be used in a shortcode successfully.
Thank you! I have realized my mistake. WordPress is changing the formatting. I now insert the codes inside a Raw HTML Editor and it works