I have a custom variable tabela with values example_table, example2, example3. And second variable kolumna with values score, date, Rising. Those variables are used in repeat by variable rows and panels.
When I try to use following query with my MySQL data source I get an error.
USE server;
SELECT date, $kolumna FROM $tabela;
db query error: Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT date, 'score' FROM 'example2'' at line 2
It seems like when variable is used like this: $kolumna, it is substituted with built-in single quotes: 'score'. How can I avoid this?
As official documentation states:
And since your variables are multi-value (since they are used for repeat), you got built-in quoting.
Disabling of built-in quoting described here:
Additionally, since here on the moment of substitution variable is effectively guaranteed to have a single value, you can use
${variable:raw}.