chab0tais
Forum Replies Created
-
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”])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”]
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]/150Open A : [sqlgetvar]
SELECT COUNT(*) FROMmod182_cb_frontend_data_table
WHERE form_id=2 AND dynamic_frontend_value LIKE ‘%A%’
[/sqlgetvar]
Open B : [sqlgetvar]
SELECT COUNT(*) FROMmod182_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).