0

这是我拥有的当前代码。

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专栏。

我哪里错了?

4

1 回答 1

1

显然这应该是

INNER JOIN `ps_product` 

代替

INNER JOIN `ps_product_shop` 
于 2013-08-01T14:06:36.963 回答