这是在mysql中编写触发器的方法吗?
DELIMITER //
CREATE TRIGGER metKeywords_after_insert AFTER
UPDATE
ON
ps_product_lang FOR EACH ROW
BEGIN
-- variable declarations
SET
@id INT(10) ;
SET
@keywords VARCHAR(255) ;
SELECT
id_product()
INTO
@id ;
-- Find tags for productID
@keywords =SELECT GROUP_CONCAT(t.`name`)FROM`ps_tag` t WHERE t.`id_tag` IN(SELECT pt.`id_tag` FROM `ps_product_tag` pt WHERE pt.`id_product=@id)
-- update record into table
UPDATE ps_product_lang SET 'meta_keywords' = @keywords WHERE 'id_product' = @id
END;
DELIMITER ;