Make custom query parameter literal vs string

However nutty this may be, I would like to make a way in Wappler to search every piece of data inside every table inside my database.

I start off with a custom query

SELECT * FROM information_schema.`COLUMNS` C WHERE TABLE_SCHEMA = 'mydatabasename';

I add schema for

TABLE_NAME          Type: Text
COLUMN_NAME         Type: Text

I then add a repeat to that and it outputs perfectly, with all table names and all column names in my entire database

Inside the repeat step I would now like to add the following secondary custom query

SELECT :P2 FROM :P1;

:P1 has been set to {{TABLE_NAME}}
:P2 has been set to {{COLUMN_NAME}}

Now I run this and get an error, the reason for the error is my syntax of the query

SELECT 'my_column' FROM 'my_table';

If this were without the single quote marks around the column and table name it would be valid. like this

SELECT my_column FROM my_table;

Question is, is there a way to force :P1 and :P2 to output as literal values and not as strings like this.
I tried changing the Schema returned from query 1 to Number instead of Text but that seemed to make no difference.

Community Page
Last updated: