sql - Update Postgres rows using an array from client using Node.JS -
i receiving array of values client(client) in node , update rows r_id column matches array.
other iterating on array , updating each looked element in turn, there way me following?
- select records r_id column matches value client
- update records in column bool false true
any ideas?
thank you
simply use any , pass array:
client.query("update some_table set some_column=true id = any($1)",[array], function (err, result) ...
Comments
Post a Comment