I'm using mysqljs\mysql in a Node application and I've run into some trouble performing statements with 'in' clauses.
Under paramater escaping, the documentation states that:
Arrays are turned into list, e.g. ['a', 'b'] turns into 'a', 'b'
But when i try something like this:
var sql = "SELECT * FROM table WHERE name IN (?)";
var params = ['a', 'b', 'c'];
console.log(mysql.format(sql, params));
I get a query containing only the first value of the array:
"SELECT * FROM table WHERE name IN ('a')"
params.join(','). But this should be done only if this is not possible with mysqljs