这是我拥有的当前代码。
UPDATE
`ps_product_shop`
SET
`ps_product_shop`.`active` = `ps_product`.`active`
FROM
`ps_product_shop`
INNER JOIN
`ps_product_shop` ON `ps_product_shop`.`id_product` = `ps_product`.`id_product`
我正在尝试获取表中的active
列以从ps_product_shop
表中获取 active 的值ps_product
。本质上,如果ps_product
“活动列”为“0”,我需要ps_product_shop
“活动列”也为“0”。他们共享id_product
专栏。
我哪里错了?