Here is a line from my node js code:
var qry = 'INSERT INTO "sma"."RMD"("UserId","Favourite") VALUES (' + req.body.user + ',' + JSON.stringify(req.body.favourite) + ')'
I want to insert single quotes before JSON.stringify(req.body.favourite)
. But i'm unable to escape the single quotes. I can't debug the issue since I'm uploading the code to a predix cloud server
Any idea how to achieve that?
Why don't you use prepared statements?