Can anyone advise on how to use this built in variable in SQL reports?
As a test i tried the following code:
SELECT *
FROM prefix_user AS u
WHERE u.id = %%FILTER_VAR%%
Pressing "Save" gives:
Error reading from database
Debug info: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 5000' at line 3
SELECT *
FROM mdl_user AS u
WHERE u.id = LIMIT 0, 5000
[array (
)]
Error code: dmlreadexception
Looks like the %%FILTER_VAR%% isn't being replaced by an actual number as happens with the other variables.
Is there a setting somewhere to enable its use?
Thanks
Mik