I am at a complete loss as to what I'm doing wrong. I am trying to do a simple UPDATE function with Sequelize/mySQL and my command doesn't work as expected. Here is the command:
await dataArr.map((e) => {
Users.update(
{ account_status: -1 },
{
returning: true,
where: { user_id: e.customer_id }
}
).then((res) => {
console.log(res);
return res;
});
});
when the command get executed the query looks like:
Executing (default): UPDATE `users` SET `account_status`=? WHERE `user_id` = ?
as you can see the query is missing both the fixed value from account_status and the variable e.customer_id which is definitely being passed as I can console.log it. This has to be something really simple that I'm missing but I haven't found anyone with a similar problem.