php - Update specific column equal to other table -
i have 2 tables, wich 1 of them appen other. i'am using opencart, , need update title products specific category.
example: oc_product_description
product_id language_id name 1 3 t-backs model 887 róża 2 3 t-backs model 912 róża 3 3 push model 3173 róża
oc_product_to_category
category_id product_id 1 1 2 1 3 1
and can't imagine query should use..
update oc_product_description set name = replace(name, 't-backs model', 'back') product_id = select product_id oc_product_to_category category_id = 54;
thanks :)
update oc_product_description set name = replace(name, 't-backs model', 'back') product_id in ( select product_id oc_product_to_category category_id = 54 );
this you.
Comments
Post a Comment