I'm trying to make an UPDATE statement with an INNER JOIN in (MY)SQL. I already took examples and edited the table names and table columns to mine. But my MYSQL still keep giving me an error (#1064).
ERROR
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM favorites INNER JOIN images ON favorites.image_id = images.id W' at line 5
SQL
UPDATE
  favorites
SET
  favorites.archive = 1
FROM
  favorites
INNER JOIN
  images
ON
  favorites.image_id = images.id
WHERE
  favorites.user_id = '1'
Thanks in advance in helping me out on this one.
Kind regards,
 
     
     
    