I have a number of DB Data Source assets that contain SQL queries with variable names (set in the Dynamic Inputs screen) drawing from GET variables.
However, Matrix is throwing an error message on save, citing a syntax error at the variable name's position, e.g.:
...WHERE (
groups
.idgroups
= %%foo%%)
It seems that Matrix is getting stuck at the foo variable:
SQL Execution Error:Error: SQLSTATE[42000]: Syntax error or access violation: ... WHERE (`groups`.`idgroups` = E'')
If I replace %%foo%% with a hard coded value, the query is accepted and the results appear as expected on the relevant web page.
Any thoughts on why this might be happening?