I want to select table inside my query to be dynamically changed depends on the dropdown value. So for example:
Dropdown value is A, then I want to SELECT * FROM A
if dropdown value is B, then I want to SELECT * from B
How to achieve this? I tried to change the table with dropdown value but wont work.
Real example:
select id, id_proveedor, nombre, apellidos, email, genero, ip, fecha_colecta, date_update, campanya from {{ddown_table.value}}
But this won't work.
message:"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 ''usuarios_uk'
at line 1"
If that won't work for you and you absolutely have to have the table names be variable you can try creating a new SQL resource with prepared statements disabled that you can use to run the query.