List:General Discussion« Previous MessageNext Message »
From:Marcel Grandemange Date:July 9 2009 12:14am
Subject:Another Trigger Question!
View as plain text  
Good Day once again.

 

Im needing assistance again with triggers!

 

 

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.

 

Any ideas on how syntax should be?

Also anyone know of any good ebooks that describe triggers in depth? I find
most info I find on web is simplistic at best or simply don't explain well
anough for my level!

 

 

Regards


Thread
Another Trigger Question!Marcel Grandemange9 Jul
  • Re: Another Trigger Question!Dan Nelson9 Jul