I am trying to pass array of cities to the IN clause but seems inverted commas are removed while preparing query
Here is the code
let city = ["Moscow", "Paris"];
let sql = 'SELECT* FROM cities WHERE city IN ('+city+')';
console.log(sql);
and in the console I am getting this
SELECT* FROM cities WHERE city IN (Moscow, Paris);
and thus getting exception while executing query!
Any help?
+. Try withjoinon the array instead to build your string first