CREATE TRIGGER google_inventory BEFORE UPDATE ON `cataloginventory_stock_item`
FOR EACH ROW
BEGIN
update `catalog_product_entity_int`
set value=20
where attribute_id=552
and entity_id=NEW.product_id
and NEW.is_in_stock=0;
update `catalog_product_entity_int`
set value=21
where attribute_id=552
and entity_id=NEW.product_id
and NEW.is_in_stock=1;
END;
을 만들 수 있습니다.트리거 문이 나에게 다음과 같은 오류를 제공
는 NEW.product_id 및 NEW.is_in_stock 무엇인가? – Taryn
새로운 것은이 문서 http://dev.mysql.com/doc/refman에 따라 테이블에서 변경되는 내용을 나타내는 트리거 구문입니다. /5.0/en/create-trigger.html – RThomas