Let's say I have an array of numeric ID's
let arr = [123, 456]
Now, I want to get all the records with these ID's
try{
connection.execute({
binds: [arr],
sqlText: `
SELECT DISTINCT name, id
FROM my_table
WHERE id IN (?)
`,
complete: (err, stmt, rows) => {
// receive results
}
});
I'm only getting 1 column, for the first id in the "arr" array. I would like to get results of all the rows that match the id's in the "arr" array