I'm trying to query mysql database with where clause as below.
Here popularTopicsNames is a dynamic array and its length and elements varies.
var scoreQuery=connection.query('SELECT * FROM LEADERBOARD WHERE SUBTOPIC IN ('+popularTopicsNames+')', function(err,result,fields){
if(err) throw err;
else{
console.log(result);
}