我正在使用以下代码:
DELIMITER $$
DROP TRIGGER IF EXISTS after_insert_temp_ecs $$
CREATE
TRIGGER `after_insert_temp_ecs` AFTER insert ON `ecs`
FOR EACH ROW BEGIN
set @count =1;
WHILE(@count<=NEW.installments) THEN
insert into temp_ecs (amount_temp,_date_temp,id,name,installments) values(NEW.amount,(date_add(NEW._date,interval @count month)),NEW.id,NEW.name,NEW.installments);
set @count=@count+1;
END WHILE;
END;
$$
DELIMITER ;
但是当我使用它时无限循环执行。代码中的错误是什么