i have table look like this:

ID          post_title                      post_type
------------------------------------------------------
1           product A                       product
2           product A - Size S              product_variation
3           product A - Size M              product_variation
4           product A - Size L              product_variation
5           product B                       product
6           product A - Size S              product_variation
7           product A - Size M              product_variation
8           product A - Size L              product_variation

i want to be like this one :

ID          post_title                      post_type
------------------------------------------------------
1           product A                       product
2           product A - Size S              product_variation
3           product A - Size M              product_variation
4           product A - Size L              product_variation
5           product B                       product
6           product B - Size S              product_variation
7           product B - Size M              product_variation
8           product B - Size L              product_variation

post_title value on ID 6,7,8 change from “product A” into “product B”.

how to change the value post_title of id 6,7,8 which following post_type “product”

Read more here: SQL – Replace value of table from another table value with condition


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: