added seb's nice PHP extended service code snippet
authorMarc Cromme <marc@indexdata.dk>
Sat, 4 Mar 2006 21:07:57 +0000 (21:07 +0000)
committerMarc Cromme <marc@indexdata.dk>
Sat, 4 Mar 2006 21:07:57 +0000 (21:07 +0000)
doc/administration.xml

index c0c0a99..cd0572e 100644 (file)
@@ -1,5 +1,5 @@
 <chapter id="administration">
 <chapter id="administration">
- <!-- $Id: administration.xml,v 1.25 2006-02-16 16:50:18 marc Exp $ -->
+ <!-- $Id: administration.xml,v 1.26 2006-03-04 21:07:57 marc Exp $ -->
  <title>Administrating Zebra</title>
  <!-- ### It's a bit daft that this chapter (which describes half of
           the configuration-file formats) is separated from
  <title>Administrating Zebra</title>
  <!-- ### It's a bit daft that this chapter (which describes half of
           the configuration-file formats) is separated from
      after each update session in order write your changes from the
      shadow to the life register space.
    </para>
      after each update session in order write your changes from the
      shadow to the life register space.
    </para>
+   <para>
+    Extended services are also available from the YAZ client layer. An
+    example of an YAZ-PHP extended service transaction is given here:
+    <screen>
+    <![CDATA[
+     $record = '<record><title>A fine specimen of a record</title></record>';
 
 
-  
+     $options = array('action' => 'recordInsert',
+                      'syntax' => 'xml',
+                      'record' => $record,
+                      'databaseName' => 'mydatabase'
+                     );
+
+     yaz_es($yaz, 'update', $options);
+     yaz_es($yaz, 'commit', array());
+     yaz_wait();
+
+     if ($error = yaz_error($yaz))
+       echo "$error";
+     ]]>
+    </screen>  
+   </para>
  </sect1>
 
 
  </sect1>