MySQL Forums
Forum List  »  Triggers

Re: ADVANCED TRIGGER need help
Posted by: bram putra
Date: November 23, 2010 08:26PM

thanks for ur encouraging reply PB

finally i can get them using mysqludf sys_exec, after installation and other things. successfully i use this syntax:

do sys_exec('echo error >> /tmp/out3.txt');

and i start to build simple trigger for my SMS GATEWAY

delimiter //
CREATE TRIGGER test.autorespond1 AFTER INSERT on test.inbox
FOR EACH ROW BEGIN
IF SUBSTRING(New.TextDecoded,1,4) = "TEST"
THEN
do sys_exec('echo true >> /tmp/out3.txt');
ELSE
do sys_exec('echo false >> /tmp/out3.txt');
end if;
end;
//

from explanation above, when i send SMS to my server using word TEST, the system successfully add TRUE words into file /tmp/out3.txt

but i want somethin more, so when i send SMS using word TEST SUCCESS, the system will add string SUCCESS into /tmp/out3.txt

Can u help me again?
Thx

Options: ReplyQuote


Subject
Views
Written By
Posted
4647
November 17, 2010 07:45PM
1380
November 17, 2010 09:26PM
1376
November 17, 2010 10:05PM
1210
November 18, 2010 06:21AM
1148
November 19, 2010 05:51PM
Re: ADVANCED TRIGGER need help
2363
November 23, 2010 08:26PM
1125
November 24, 2010 12:33AM
1138
November 24, 2010 01:35AM
1095
November 29, 2010 02:40PM
1079
November 29, 2010 07:52PM
1249
November 29, 2010 10:54PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.