List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:July 9 2009 2:11am
Subject:Re: Another Trigger Question!
View as plain text  
In the last episode (Jul 09), Marcel Grandemange said:
> Create Trigger hostchange
> BEFORE UPDATE ON host
> FOR EACH ROW
> BEGIN
> IF NEW.status != OLD.status THEN
> use smsgw;
> insert into outbox (number, insertdate, text, phone, dreport) VALUES
> ('0836075144', '', 'HostDown', '1', '1')");
> END IF;
> END;
> 
> I have my idea of a trigger above that for obvious reasons wont work ,
> however describes what im trying to do best!
> 
> Im monitoring a value status and if it changes id like to insert a record
> into a entirely separate table in a separate DB.

insert into smsgw.outbox [...]
 
-- 
	Dan Nelson
	dnelson@stripped
Thread
Another Trigger Question!Marcel Grandemange9 Jul
  • Re: Another Trigger Question!Dan Nelson9 Jul