i need to do a multiple row delete query with the where clause in list (id1,id2..) But since we don't have lists in JS i'm having a problem with passing the parameters to the query.This is my code:
let list =[1,2,..];
let Query = 'DELETE FROM Table WHERE id IN (?)';
connection.query(Query,list, function (err, result) {
`enter code here`
};
when i pass it this way and after logging the mysql server to a Logfile i see that it actually passes only the first id.
PS : i tried without the parentheses around ? and also doing a Array.join on the list but both didn't work.