i would like to convert a javascript array ids = [ 378, 464 ] to an array that MySQL is successfully parsing.
My SQL query includes the array like this:
Do something WHERE id IN ("472", "467").
This query works in MySQL Workbench.
I am struggling to get the array in the needed structure. I tried the following javascript structures within my api but i cannot get it to work.
("378", "464")
[ 378, 464 ]
('472', '467')
MYSQL Error Message:
code: 'ER_PARSE_ERROR',
errno: 1064,