i want to convert a field when a insertion takes place in one of my table.
check & ged's => check and geds.
DELIMITER $$
CREATE
TRIGGER `perma_limk_insertion` AFTER INSERT
ON `tbl_magazine`
FOR EACH ROW BEGIN
DECLARE magazine_name VARCHAR(100);
@magazine_name := REPLACE(FieldName,'&','and');
@magazine_name := REPLACE(FieldName,"'",'');
UPDATE tbl_magazine SET perma_link = magazine_name WHERE MAGAZINE_ID = NEW.MAGAZINE_ID;
END$$
DELIMITER ;
this is my trigger. but i got an error that
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '@magazine_name := REPLACE(FieldName,'&','and'); @magazine_name := REPLA' at line 7
if any one know about this. please help me
Thanks in advance