A
A
alskorpius2021-03-23 18:35:49
opencart
alskorpius, 2021-03-23 18:35:49

How to transfer data from one table to another in Opencart?

The database has 2 tables:
oc_product - columns: product_id; name... ... product_1c_id

and second table oc_product_to_1c - columns: product_id; 1c_id
each table has a common denominator - product_id

How can I transfer data from the product_1c_id column of the oc_product table to the 1c_id column of the oc_product_to_1c table?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Gnevyshev, 2021-03-23
@iResource

More or less like this:

UPDATE oc_product t1, oc_product_to_1c t2 
SET t2.1c_id = t1.product_1c_id
WHERE t2.product_id = t1.product_id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question