My query is incorrect when trying to update a record in mysql via node but I can't figure out why

32 Views Asked by At

This question is asked several times but specifically to this one I'm not sure what I'm doing wrong.

Error: UNKNOWN_CODE_PLEASE_REPORT: CONSTRAINT `products.image` failed for `apiDbInk`.`products`

Here is my syntax:

  mysqlCon.query('UPDATE products SET image = "blah blah" WHERE id = 261', function(err, res) {
    console.log('this is an error');
    console.log(err)
  })

The table is products and there's a column called "image", type "LONGTEXT" Any idea what I'm doing wrong?

0

There are 0 best solutions below