Answer the question
In order to leave comments, you need to log in
How to update key names by condition via SQL query?
Tell me, pliz, how can I change the name of the meta key in the table?
I work with a database on Wordpress.
The `wp_postmeta` table has the following columns: meta_id, post_id, meta_key, meta_value
Condition: for all posts where the condition `meta_key` = '_price' AND `meta_key` = 'convert_to_rub' is met -> change '_price' to '_euro_price'.
I thought that I could automatically create duplicates of '_euro_price' from '_price' , and then clear '_price' , but it seems even more difficult to me.
This is necessary in order to remake the current algorithm for the formation of ruble prices from euros at the current exchange rate.
I have not come across anything like this and therefore I turn to the community. thanks in advance
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question