• Resolved davitabile

    (@davitabile)


    Hi Eli,
    I hope you could help me with this issue:
    the following query

    SELECT arg_id FROM vrb_new_arg WHERE arg_id=<?php $_GET[wpda_search_column_arg_id]; ?>

    works fine if I use the regulart shortcode

    [SQLREPORT name=”sqlvartest”]

    However in this form

    [sqlgetvar]SELECT arg_id FROM vrb_new_arg WHERE arg_id=<?php $_GET[wpda_search_column_arg_id]; ?>[/sqlgetvar]

    I obtain the following result

    This SQL Query has not been allowed by an Administrator.

    But if I sobstitute the this method <?php $_GET[wpda_search_column_arg_id]; ?> with the actual url parameter like this

    [sqlgetvar]SELECT arg_id FROM vrb_new_arg WHERE arg_id=2 [/sqlgetvar]

    the result is correct

    could you help me with this?

    thanks a lot

    Daniele

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Eli

    (@scheeeli)

    There are many reasons outside of the control of my plugin that the SQL Query you are entering into the shortcod in your content area might be getting altered before the shortcode itself is executed. There are even core functions of WordPress that will “make pretty” the contents you enter, even with a shortcode, and before the shortcode is evaluated. You can try debugging the code by outputting the $MySQL variable that is received by the ELISQLREPORTS_get_var function so that you can see exactly what part of your code is being changed, or you can just stick to using the slug for your SQL Query in place of the whole Query itself, like this:
    [sqlgetvar]sqlvartest[/sqlgetvar]

    Thread Starter davitabile

    (@davitabile)

    Hi Eli thanks a lot for your quick reply

    this [sqlgetvar]sqlvartest[/sqlgetvar] effectively works!

    Daniele

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[sqlgetvar]’ is closed to new replies.