E-Mail vom MySQL-Trigger senden, wenn eine Tabelle aktualisiert wird
etrachten Sie eine Tabelle alstable2
, ich möchte ein @ hinzufügtrigger
auf diesem Tischupdate
wi
select Num into num from table1 where ID=new.id;
BEGIN
DECLARE done int default false;
DECLARE cur1 CURSOR FOR select EmailId from users where Num=num;
DECLARE continue handler for not found set done = true;
OPEN cur1;
my_loop: loop
fetch cur1 into email_id;
if done then
leave my_loop;
end if;
//send mail to all email id.
end loop my_loop;
close cur1;
END;
Gibt es eine einfache Methode, um an der Stelle zu schreiben, die kommentiert wurde? So senden Sie eine E-Mail an alle E-Mail-IDs, die aus table @ abgerufen wurdusers
.
Ich verwende MySQL in XAMPP (phpmyadmin).