0

次の SQL コードを使用して、指定されたカテゴリ ID を持つ同じ説明を持つすべての製品を設定したいのですが、同じカテゴリの下にあるときに同じ説明を持つ製品を更新しません。

update catalog_product_entity_text
  set value = "the product's name test hah test."
  where attribute_id = 66 and
        entity_id (select product_id from catalog_category_product
                    where category_id = 40);

ありがとうございました。

4

2 に答える 2

0

次のように「entity_idIN...」を使用してみてください。

update catalog_product_entity_text
  set value = "the product's name test hah test."
  where attribute_id = 66 and
        entity_id IN (select product_id from catalog_category_product
                    where category_id = 40);
于 2013-01-09T17:31:08.140 に答える
0

INentity_id と select クエリの間に書き忘れました。

どのバージョンを使用しているかはわかりませんが、私にとって short_description の attribute_id は 65 で、説明は 64 です。

于 2013-01-09T17:31:46.593 に答える