SyntaxFix
Write A Post
Hire A Developer
Questions
Replace the string
value = value.replace(/'/g, "\\'");
where value is your string which is going to store in your Database.
Further, NPM package for this, you can have look into it
Further,
NPM package for this, you can have look into it
https://www.npmjs.com/package/mysql-apostrophe