Skip to main content
Updated question to indicate that I would like to update all users at once via phpMyAdmin.
Source Link

I would like to copy the meta_value from row to another (in the same table) where the user_id matches.

Each user in the wp_usermeta table has a meta_key/meta_value pair for first_name and a meta_key/meta_value pair for shipping_first_name. I would like to copy the shipping_first_name value to the first_name value where the user_id matches. I would like to update all users in the database at once (e.g., via phpMyAdmin).

How should this MySQL query be written?

I would like to copy the meta_value from row to another (in the same table) where the user_id matches.

Each user in the wp_usermeta table has a meta_key/meta_value pair for first_name and a meta_key/meta_value pair for shipping_first_name. I would like to copy the shipping_first_name value to the first_name value where the user_id matches.

How should this MySQL query be written?

I would like to copy the meta_value from row to another (in the same table) where the user_id matches.

Each user in the wp_usermeta table has a meta_key/meta_value pair for first_name and a meta_key/meta_value pair for shipping_first_name. I would like to copy the shipping_first_name value to the first_name value where the user_id matches. I would like to update all users in the database at once (e.g., via phpMyAdmin).

How should this MySQL query be written?

Source Link

Copy usermeta value where ID matches in the same table

I would like to copy the meta_value from row to another (in the same table) where the user_id matches.

Each user in the wp_usermeta table has a meta_key/meta_value pair for first_name and a meta_key/meta_value pair for shipping_first_name. I would like to copy the shipping_first_name value to the first_name value where the user_id matches.

How should this MySQL query be written?