Describe the problem/error/question
I’m using the MySQL node Execute Query function, and am entering a list of about 20 parameters. Some of the parameter values are text, and some of those text fields have commas in them.
What is the error message (if any)?
That screws up the parameters. If the text in the query parameters field is
{{ $json.field1 }},{{ $json.field2 }},{{ $json.field3 }}
and
field1 is "Lee"
field2 is "New York, NY"
field3 is 10011
Then my insert statement of
INSERT (Name, CityState, Zip) VALUES ($1, $2, $3)
evaluates to
INSERT (Name, CityState, Zip) VALUES ('Lee', 'New York','NY', 10011)
I tried setting the list to
'{{ $json.field1 }}','{{ $json.field2 }}',{{ $json.field3 }}
but the quotes ended up as part of the input string.
Please share your workflow
It’s too long and complicated, but if you really need it I’ll include it.
Information on your n8n setup
- Version: 0.236.1
- Database: MySQL
- n8n EXECUTIONS_PROCESS setting (default: own, main): I forget
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm / pm2
- Operating system: ubuntu