Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Is there any way to notify event from DB to PHP

Re: Is there any way to notify event from DB to PHP

From: Harald Maier <maierh_at_myself.com>
Date: Wed, 27 Aug 2003 17:54:44 +0200
Message-ID: <m3lltff64b.fsf@ate.maierh>


wonim.somaggio_at_lusis.fr (Petit Donghwa) writes:

> But, for test, I can't understand. In where I can make it and how
> can I use it?

Create the trigger and insert in the same session for example a record into the test table. In another sqlplus session start the script [Test]. That's it.

>
> --[ signal ]
> create or replace trigger dept_aiud
> after insert on dept
> begin
> -- Needs execute rights.
> dbms_alert.signal( 'dept_modify', 'dept is modified' );
> end;
> /
>
>
> ----[ Test ]
> declare
> proc varchar2(20) := 'dept_modify';
> msg varchar2(256);
> stat number := 0;
> begin
> dbms_alert.register(proc);
> dbms_alert.waitone(proc,msg,stat,60);
> if stat = 0 then
> null; -- do something (??????)
> end if;
> dbms_alert.remove(proc);
> end;

Harald Received on Wed Aug 27 2003 - 10:54:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US