Hi, I know that this might be challenging but I’d like to use the same table. Any ideas how to hack it?
DELIMITER $$
CREATE TRIGGER slug_after_insert
AFTER INSERT ON pb_trig
FOR EACH ROW
BEGIN
IF NEW.element_id = 1 THEN
SET @txt = NEW.content;
SET @txt = txt2slug(@txt);
INSERT INTO pb_trig(post_id, element_id, lang_id, slug)
VALUES (NEW.post_id, 3, NEW.lang_id, @txt);
END IF;
END $$
DELIMITER ;