Sidi Med Sidi Med - 2 months ago 10
MySQL Question

update table from other error in mysql XAMPP

I'm trying to update table from other but I got error this is my query

UPDATE items
SET items.Price = prix.Price from items,prix WHERE items.ID = prix.ID

Answer

There is no update ... from Syntax. You have to use update ... join:

UPDATE items join prix on items.ID = prix.ID
SET items.Price = prix.Price