I am trying to update a table in a mysql database, and am getting a syntax error. It is a MyISAM table if that matters.
Here is the sql
UPDATE product SET price=(price*1.0909)
JOIN product_to_category ON product.product_id = product_to_category.product_id
WHERE category_id =6
OR category_id =1
OR category_id =2
My goal is to get a list of products from 3 specific categories (information from the *product_to_category* table) and increase the price by about 10%. The price is contained in the product table.
From what I see in the documentation I can use join in the update statement, and I have done similar queries in the past.
This is a production website, which currently has about 40,000 products. If needed I can do a php script that will loop through the products and do it one by one, but it seems like I should be able to do it directly from mysql.