var comma = ",";
var querys = "insert into movie values ("
+ "'" + movid + "'"
+comma
+ "'" + name + "'"
+ comma
+ "'" + genere + "'"
+ comma
+ "'" + director + "'"
+ comma
+ "'" + description + "'"
+ ")";
I am having a problem with about code. I am building a website with express.js and mysql where the user can submit new movies to the site.
Most of the description submitted by users have a single in it (example: This movie wasn't shot in studio). Sentences like these gives an error. I have tried using comma as variable and also "'" like this.
Any solution for this? I can't make the users use \' because most of them don't know about it.