Hi all!
I was wondering how I can change the value of a dynamic value (the column is chosen through user input).
As an example, I built a form with three input values.
textinput1.value(Integer)select1.value(String)select2.value(String)
select2.value is used as an identifier (select a row). textinput1.value is the integer value I want to change in the column named as select1.value.
I've written the query as followed:
UPDATE table
SET {{ select1.value }} = {{ parseInt(textinput1.value) }}
WHERE agendaNaam = {{ select2.value }}
But then I get the following error:
You can clearly see the problem are the quotation marks in the select1.value.
So I've tried to overcome it with javascript but the code is not working:
select2.value.replace( /'/g, '' )
Is there any other way to fix this?
Thanks in advance,
Pello