Use named query parameter as db table column name to be updated

Hi,

I am trying to use a named query to update a value in one of four columns in a MySQL database table. However it looks like if I use a string parameter to tell the query the field to update it doesn't work. The value parameter works fine.

image

image

Is this possible at all?

Did not find this case in any of the other topics...

Thanks.

edited typo

Change Type from Value to QueryString and re-drag the parameter into the query. Be careful as the inputs are not sanitized

Use type QueryString:
image
Then:

SET
        {entryName} = :entryValue

...but beware of SQL injection--don't do it if entryName is generated by user input!

2 Likes

Thank you so much! Don't know why I looked at forum first. Thanks for the time. D

1 Like