Using Variables to dynamically select Columns in MySQL

This is how it looks when its not working.

this is the autogenereated query when using the variables, and when “multi-select” is activated

SELECT
  zeit AS "time",
  'Machine4711','Machine1438','Machine1234','Machine5475'
FROM machinenzustandstabelle
ORDER BY zeit

It seems like it adds those " ’ ", and this is against the Syntax of mysql.

If multi-value is not selected i get the correct autogenerated query

SELECT
  zeit AS "time",
  Machine4711,Machine1438,Machine1234,Machine5475
FROM machinenzustandstabelle
ORDER BY zeit

But the Problem is that i cant dynamically select the machines that i want

1 Like