Jump to content

[SOLVED] Duplicate fields value in DB


Recommended Posts

Hi,
could someone give me an advice about copy value from one field in DB (ps_product) to another.
I have no idea about php programing but can follow instructions.

I need to copy (duplicate) EAN13 value to REFERENCE (all in ps_product).


I just need the right command for MySQL DB.
Thank you guys in advance.

Link to comment
Share on other sites

The following query will copy the ean13 field of each product into the reference field of the product.

UPDATE `ps_product` SET `reference` = `ean13`



Change ps_ to whatever database prefix you are using. Note that this query will overwrite every reference that is already on your products, so make a backup of the ps_product table first in case you need to restore the reference of a product.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...