最近寫了一直Web Service給很多不同站的客戶端呼叫,并直接寄信通知程式中的異常. 直接在oracle中設置某張表的trigger(after insert),當有新的異常資料寫入時候,寄給相關站別的管理員. /* Written by milo on 2017-03-09 *觸發器發送email */ CREATE OR REPLACE TRIGGER small_program_exception_afin AFTER INSERT ON small_program_exception
CREATE OR REPLACE FUNCTION XF_VIP_AFUPD_WX() RETURNS trigger AS $$ DECLARE i_count integer; s_wx_openid varchar(256); s_docno varchar(60); s_wx_code varchar(256); s_wx_cardid varchar(256); begin if (old.xf_currentbonus!=new.xf_currentbonus) then sele
Create TRIGGER [dbo].[trigInstructionsDelete] ON dbo.Instructions instead OF DELETE AS BEGIN DECLARE @InsId INT SELECT @InsId=InstructionsID FROM deleted --删除 DELETE dbo.Transfer WHERE InstructionsID=@InsId DELETE dbo.Instructions WHERE InstructionsI