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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -