Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter chab0tais

    (@chab0tais)

    I wrote it here :

    function ELISQLREPORTS_init() {
    remove_filter (‘the_content’, ‘wptexturize’);
    if (isset($GLOBALS[“ELISQLREPORTS”][“reports_array”]) && is_array($GLOBALS[“ELISQLREPORTS”][“reports_array”])) {
    $Report_Number = 0;
    if (isset($GLOBALS[“ELISQLREPORTS”][“settings_array”][“menu_sort”]) && $GLOBALS[“ELISQLREPORTS”][“settings_array”][“menu_sort”])

    Thread Starter chab0tais

    (@chab0tais)

    A last think : if I create a report qith the same query, it works properly. But I can’t insert the result into a text paragraph with [SQLREPORT name=”nbinscritsopena”]

    Thread Starter chab0tais

    (@chab0tais)

    Here it is:

    Nombre d’inscrits actuel : [sqlgetvar]SELECT COUNT(*) FROM mod182_cb_frontend_data_table where form_id=2 and dynamic_control_id=6[/sqlgetvar]/150

    Open A : [sqlgetvar]
    SELECT COUNT(*) FROM mod182_cb_frontend_data_table WHERE form_id=2 AND dynamic_frontend_value LIKE ‘%A%’
    [/sqlgetvar]
    Open B : [sqlgetvar]
    SELECT COUNT(*) FROM mod182_cb_frontend_data_table WHERE form_id=2 AND dynamic_frontend_value LIKE “%B%”
    [/sqlgetvar]

    This code displays:

    Nombre d’inscrits actuel : 1/150

    Open A :
    Open B :

    The first query is working properly.
    The second and the third are not working with sqlgetvar, and they work fine on phpmyadmin. I tried also the syntax:

    dynamic_frontend_value=”Open B”

    or

    dynamic_frontend_value LIKE “Open B”

    that works on phpmyadmin, but not with sqlgetvar.
    If I suppress:

    AND dynamic_frontend_value LIKE ‘%A%’

    sqlgetvar returns a value (that is not what I want tot do, but that shows the problem comes probably from the incorrect encoding of quotes characters by WP).

    • This reply was modified 8 years, 1 month ago by chab0tais.
    • This reply was modified 8 years, 1 month ago by chab0tais.
    • This reply was modified 8 years, 1 month ago by chab0tais.
Viewing 3 replies - 1 through 3 (of 3 total)