Use this way,
UPDATE shopproducts AS wesp
JOIN currencies AS wec
JOIN shopcategories AS wesc
JOIN shops AS wes
SET wesp.totalprice = case when (wesc.adelivery = 1) then ROUND(wesp.price / 100 * wec.value, 0) + wes.adelivery .....(like this way all the when) end
WHERE wesp.currency = wec.name
AND wesp.sortcategory = wesc.category
AND wesp.shop = wes.name
1
solved MySQL/SQL query with errors [closed]