abies           Tue Sep  2 07:55:12 2003 EDT

  Modified files:              
    /phpdoc/en/reference/ibase/functions        ibase-set-event-handler.xml 
  Log:
  Dericize example :-)
  
Index: phpdoc/en/reference/ibase/functions/ibase-set-event-handler.xml
diff -u phpdoc/en/reference/ibase/functions/ibase-set-event-handler.xml:1.1 
phpdoc/en/reference/ibase/functions/ibase-set-event-handler.xml:1.2
--- phpdoc/en/reference/ibase/functions/ibase-set-event-handler.xml:1.1 Tue Sep  2 
07:40:36 2003
+++ phpdoc/en/reference/ibase/functions/ibase-set-event-handler.xml     Tue Sep  2 
07:55:11 2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
   <refentry id="function.ibase-set-event-handler">
    <refnamediv>
     <refname>ibase_set_event_handler</refname>
@@ -22,22 +22,26 @@
      events. The callback is called with the event name and the link resource as 
arguments
      whenever one of the specified events is posted by the database. The callback must
      return false if the event handler should be canceled. Any other return value is 
ignored.
+       </para>
+       <para>
      <informalexample>
       <programlisting role="php">
 <![CDATA[
+<?php
 
-function event_handler($event_name, $link)
-{
-    if ($event_name=="NEW ORDER") {
-       // process new order
-       ibase_query($link, "UPDATE orders SET status='handled'");
-    } else if ($event_name=="DB_SHUTDOWN") {
-       // free event handler 
-       return false;
+    function event_handler($event_name, $link)
+    {
+        if ($event_name=="NEW ORDER") {
+            // process new order
+            ibase_query($link, "UPDATE orders SET status='handled'");
+        } else if ($event_name=="DB_SHUTDOWN") {
+            // free event handler 
+            return false;
+        }
     }
-}
 
-ibase_set_event_handler($link,"event_handler","NEW_ORDER","DB_SHUTDOWN");
+    ibase_set_event_handler($link,"event_handler","NEW_ORDER","DB_SHUTDOWN");
+?>
 ]]>
       </programlisting>
      </informalexample>

Reply via email to