hholzgra                Mon Nov 12 12:54:07 2001 EDT

  Modified files:              
    /phpdoc/en/functions        sesam.xml 
  Log:
  whitespace/indent fix reverted (due to misindentatioin of examples :( )
  
  
Index: phpdoc/en/functions/sesam.xml
diff -u phpdoc/en/functions/sesam.xml:1.17 phpdoc/en/functions/sesam.xml:1.18
--- phpdoc/en/functions/sesam.xml:1.17  Mon Nov 12 11:56:56 2001
+++ phpdoc/en/functions/sesam.xml       Mon Nov 12 12:54:01 2001
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.17 $ -->
+<!-- $Revision: 1.18 $ -->
  <reference id="ref.sesam">
   <title>SESAM database functions</title>
   <titleabbrev>SESAM</titleabbrev>
@@ -43,77 +43,77 @@
      There is no standalone support for the PHP SESAM interface, it
      works only as an integrated Apache module. In the Apache PHP
      module, this <link linkend="ini.sect.sesam">SESAM interface is
-      configured</link> using Apache directives.
+     configured</link> using Apache directives.
      <table>
       <title>SESAM Configuration directives</title>
       <tgroup cols="2">
        <thead>
         <row>
-         <entry>Directive</entry>
-         <entry>Meaning</entry>
+        <entry>Directive</entry>
+        <entry>Meaning</entry>
         </row>
        </thead>
        <tbody>
         <row>
-         <entry><literal>php3_sesam_oml</literal></entry>
-         <entry>
-          Name of BS2000 PLAM library containing the loadable SESAM
-          driver modules.  Required for using SESAM functions.
-    <para>
-     Example:
-     <informalexample>
-      <programlisting role="apache">
-       php3_sesam_oml $.SYSLNK.SESAM-SQL.030
-      </programlisting>
-     </informalexample>
-    </para>
-   </entry>
-   </row>
-    <row>
-     <entry><literal>php3_sesam_configfile</literal></entry>
-     <entry>
-      Name of SESAM application configuration file.  Required for
-      using SESAM functions.
-    <para>
-     Example:
-     <informalexample>
-      <programlisting role="apache">
-       php3_sesam_configfile $SESAM.SESAM.CONF.AW
-      </programlisting>
-     </informalexample>
-     It will usually contain a configuration like (see SESAM
-     reference manual):
-     <informalexample>
-      <programlisting role="bs2000">
-       CNF=B
-       NAM=K
-       NOTYPE
-      </programlisting>
-     </informalexample>
-    </para>
-   </entry>
-   </row>
-    <row>
-     <entry><literal>php3_sesam_messagecatalog</literal></entry>
-     <entry>
-      Name of SESAM message catalog file.  In most cases, this
-      directive is not neccessary. Only if the SESAM message file
-      is not installed in the system's BS2000 message file table,
-      it can be set with this directive.
-    <para>
-     Example:
-     <informalexample>
-      <programlisting role="apache">
-       php3_sesam_messagecatalog $.SYSMES.SESAM-SQL.030
-      </programlisting>
-     </informalexample>
+        <entry><literal>php3_sesam_oml</literal></entry>
+        <entry>
+         Name of BS2000 PLAM library containing the loadable SESAM
+         driver modules.  Required for using SESAM functions.
+          <para>
+           Example:
+           <informalexample>
+            <programlisting role="apache">
+php3_sesam_oml $.SYSLNK.SESAM-SQL.030
+            </programlisting>
+           </informalexample>
+          </para>
+        </entry>
+       </row>
+       <row>
+        <entry><literal>php3_sesam_configfile</literal></entry>
+        <entry>
+         Name of SESAM application configuration file.  Required for
+         using SESAM functions.
+          <para>
+           Example:
+           <informalexample>
+            <programlisting role="apache">
+php3_sesam_configfile $SESAM.SESAM.CONF.AW
+            </programlisting>
+           </informalexample>
+           It will usually contain a configuration like (see SESAM
+           reference manual):
+           <informalexample>
+            <programlisting role="bs2000">
+CNF=B
+NAM=K
+NOTYPE
+            </programlisting>
+           </informalexample>
+          </para>
+        </entry>
+       </row>
+       <row>
+        <entry><literal>php3_sesam_messagecatalog</literal></entry>
+        <entry>
+         Name of SESAM message catalog file.  In most cases, this
+         directive is not neccessary. Only if the SESAM message file
+         is not installed in the system's BS2000 message file table,
+         it can be set with this directive.
+          <para>
+           Example:
+           <informalexample>
+            <programlisting role="apache">
+php3_sesam_messagecatalog $.SYSMES.SESAM-SQL.030
+            </programlisting>
+           </informalexample>
+          </para>
+        </entry>
+       </row>
+       </tbody>
+      </tgroup>
+     </table>
     </para>
-   </entry>
-   </row>
-   </tbody>
-   </tgroup>
-   </table>
-   </para>
     <para>
      In addition to the configuration of the PHP/SESAM interface, you
      have to configure the SESAM-Database server itself on your
@@ -121,12 +121,12 @@
      <itemizedlist>
       <listitem>
        <simpara>
-        starting the SESAM database handler (DBH), and
+       starting the SESAM database handler (DBH), and
        </simpara>
       </listitem>
       <listitem>
        <simpara>
-        connecting the databases with the SESAM database handler
+       connecting the databases with the SESAM database handler
        </simpara>
       </listitem>
      </itemizedlist>
@@ -155,7 +155,7 @@
      Only a small stub loader (SESMOD) is linked with PHP, and the
      SESAM connection modules are pulled in from SESAM's OML PLAM
      library.  In the <link
-                            linkend="ini.sect.sesam">configuration</link>, you must 
tell PHP
+     linkend="ini.sect.sesam">configuration</link>, you must tell PHP
      the name of this PLAM library, and the file link to use for the
      SESAM configuration file (As of SESAM V3.0, SQLSCI is available
      in the SESAM Tool Library, which is part of the standard
@@ -166,9 +166,9 @@
      single quotes (as opposed to a single quote preceded by a
      backslash, used in some other databases), it is advisable to set
      the PHP configuration directives <link
-                                            
linkend="ini.magic-quotes-gpc"><literal>php3_magic_quotes_gpc</literal></link>
+     linkend="ini.magic-quotes-gpc"><literal>php3_magic_quotes_gpc</literal></link>
      and <link
-               
linkend="ini.magic-quotes-sybase"><literal>php3_magic_quotes_sybase</literal></link>
+     
+linkend="ini.magic-quotes-sybase"><literal>php3_magic_quotes_sybase</literal></link>
      to <literal>On</literal> for all PHP scripts using the SESAM
      interface.
     </para>
@@ -225,42 +225,42 @@
       <tgroup cols="2">
        <thead>
         <row>
-         <entry>Scroll Type</entry>
-         <entry>Action</entry>
+        <entry>Scroll Type</entry>
+        <entry>Action</entry>
         </row>
        </thead>
        <tbody>
         <row>
-         <entry><literal>SESAM_SEEK_NEXT</literal></entry>
-         <entry>none</entry>
+        <entry><literal>SESAM_SEEK_NEXT</literal></entry>
+        <entry>none</entry>
         </row>
         <row>
-         <entry><literal>SESAM_SEEK_PRIOR</literal></entry>
-         <entry>none</entry>
+        <entry><literal>SESAM_SEEK_PRIOR</literal></entry>
+        <entry>none</entry>
         </row>
         <row>
-         <entry><literal>SESAM_SEEK_FIRST</literal></entry>
-         <entry>
-          set scroll type to <literal>SESAM_SEEK_NEXT</literal>
-         </entry>
+        <entry><literal>SESAM_SEEK_FIRST</literal></entry>
+        <entry>
+         set scroll type to <literal>SESAM_SEEK_NEXT</literal>
+        </entry>
         </row>
         <row>
-         <entry><literal>SESAM_SEEK_LAST</literal></entry>
-         <entry>
-          set scroll type to <literal>SESAM_SEEK_PRIOR</literal>
-         </entry>
+        <entry><literal>SESAM_SEEK_LAST</literal></entry>
+        <entry>
+         set scroll type to <literal>SESAM_SEEK_PRIOR</literal>
+        </entry>
         </row>
         <row>
-         <entry><literal>SESAM_SEEK_ABSOLUTE</literal></entry>
-         <entry>Auto-Increment internal offset value</entry>
+        <entry><literal>SESAM_SEEK_ABSOLUTE</literal></entry>
+        <entry>Auto-Increment internal offset value</entry>
         </row>
         <row>
-         <entry><literal>SESAM_SEEK_RELATIVE</literal></entry>
-         <entry>none. (maintain global default 
-          <parameter>
-           offset</parameter> value, which allows for, e.g., fetching
-          each 10th row backwards)
-         </entry>
+        <entry><literal>SESAM_SEEK_RELATIVE</literal></entry>
+        <entry>none. (maintain global default 
+         <parameter>
+          offset</parameter> value, which allows for, e.g., fetching
+          each 10th row backwards)
+        </entry>
         </row>
        </tbody>
       </tgroup>
@@ -310,87 +310,87 @@
       <listitem>
        <simpara>Vendor specific data types</simpara>
        <simpara>
-        Some vendor specific data types may have to be replaced by
-        standard SQL data types (e.g., <literal>TEXT</literal> could
-        be replaced by <literal>VARCHAR(max. size)</literal>).
+       Some vendor specific data types may have to be replaced by
+       standard SQL data types (e.g., <literal>TEXT</literal> could
+       be replaced by <literal>VARCHAR(max. size)</literal>).
        </simpara>
       </listitem>
       <listitem>
        <simpara>Keywords as SQL identifiers</simpara>
        <simpara>
-        In SESAM (as in standard SQL), such identifiers must be
-        enclosed in double quotes (or renamed).
+       In SESAM (as in standard SQL), such identifiers must be
+       enclosed in double quotes (or renamed).
        </simpara>
       </listitem>
       <listitem>
        <simpara>
-        Display length in data types
+       Display length in data types
        </simpara>
        <simpara>
-        SESAM data types have a precision, not a display
-        length. Instead of <literal>int(4)</literal> (intended use:
-        integers up to '9999'), SESAM requires simply
-        <literal>int</literal> for an implied size of 31 bits. Also,
-        the only datetime data types available in SESAM are:
-        <literal>DATE</literal>, <literal>TIME(3)</literal> and
-        <literal>TIMESTAMP(3)</literal>.
+       SESAM data types have a precision, not a display
+       length. Instead of <literal>int(4)</literal> (intended use:
+       integers up to '9999'), SESAM requires simply
+       <literal>int</literal> for an implied size of 31 bits. Also,
+       the only datetime data types available in SESAM are:
+       <literal>DATE</literal>, <literal>TIME(3)</literal> and
+       <literal>TIMESTAMP(3)</literal>.
        </simpara>
       </listitem>
       <listitem>
        <simpara>
-        SQL types with vendor-specific <literal>unsigned</literal>,
-        <literal>zerofill</literal>, or
-        <literal>auto_increment</literal> attributes
+       SQL types with vendor-specific <literal>unsigned</literal>,
+       <literal>zerofill</literal>, or
+       <literal>auto_increment</literal> attributes
        </simpara>
        <simpara>
-        <literal>Unsigned</literal> and<literal> zerofill</literal>
-        are not supported.  <literal>Auto_increment</literal> is
-        automatic (use <literal>"INSERT ...  VALUES(*, ...)"</literal>
-        instead of <literal>"... VALUES(0, ...)"</literal> to take
-        advantage of SESAM-implied auto-increment.
+       <literal>Unsigned</literal> and<literal> zerofill</literal>
+       are not supported.  <literal>Auto_increment</literal> is
+       automatic (use <literal>"INSERT ...  VALUES(*, ...)"</literal>
+       instead of <literal>"... VALUES(0, ...)"</literal> to take
+       advantage of SESAM-implied auto-increment.
        </simpara>
       </listitem>
       <listitem>
        <simpara>
-        <command>int ... DEFAULT '0000'</command>
+       <command>int ... DEFAULT '0000'</command>
        </simpara>
        <simpara>
-        Numeric variables must not be initialized with string
-        constants. Use <command>DEFAULT 0</command> instead. To
-        initialize variables of the datetime SQL data types, the
-        initialization string must be prefixed with the respective
-        type keyword, as in: <literal> CREATE TABLE exmpl ( xtime
-         timestamp(3) DEFAULT TIMESTAMP '1970-01-01 00:00:00.000' NOT
-          &null; ); </literal>
+       Numeric variables must not be initialized with string
+       constants. Use <command>DEFAULT 0</command> instead. To
+       initialize variables of the datetime SQL data types, the
+       initialization string must be prefixed with the respective
+       type keyword, as in: <literal> CREATE TABLE exmpl ( xtime
+       timestamp(3) DEFAULT TIMESTAMP '1970-01-01 00:00:00.000' NOT
+       &null; ); </literal>
        </simpara>
       </listitem>
       <listitem>
        <simpara>
-        <command>$count = xxxx_num_rows();</command>
+       <command>$count = xxxx_num_rows();</command>
        </simpara>
        <simpara>
-        Some databases promise to guess/estimate the number of the
-        rows in a query result, even though the returned value is
-        grossly incorrect.  SESAM does not know the number of rows in
-        a query result before actually fetching them. If you REALLY
-        need the count, try <command>SELECT COUNT(...) WHERE
-         ...</command>, it will tell you the number of hits.  A second
-        query will (hopefully) return the results.
+       Some databases promise to guess/estimate the number of the
+       rows in a query result, even though the returned value is
+       grossly incorrect.  SESAM does not know the number of rows in
+       a query result before actually fetching them. If you REALLY
+       need the count, try <command>SELECT COUNT(...) WHERE
+       ...</command>, it will tell you the number of hits.  A second
+       query will (hopefully) return the results.
        </simpara>
       </listitem>
       <listitem>
        <simpara>
-        <command>DROP TABLE thename;</command>
+       <command>DROP TABLE thename;</command>
        </simpara>
        <simpara>
-        In SESAM, in the <command>DROP TABLE</command> command, the
-        table name must be either followed by the keyword
-        <literal>RESTRICT</literal> or
-        <literal>CASCADE</literal>. When specifying
-        <literal>RESTRICT</literal>, an error is returned if there are
-        dependent objects (e.g., VIEWs), while with
-        <literal>CASCADE</literal>, dependent objects will be deleted
-        along with the specified table.
+       In SESAM, in the <command>DROP TABLE</command> command, the
+       table name must be either followed by the keyword
+       <literal>RESTRICT</literal> or
+       <literal>CASCADE</literal>. When specifying
+       <literal>RESTRICT</literal>, an error is returned if there are
+       dependent objects (e.g., VIEWs), while with
+       <literal>CASCADE</literal>, dependent objects will be deleted
+       along with the specified table.
        </simpara>
       </listitem>
      </itemizedlist>
@@ -412,26 +412,26 @@
       <tgroup cols="2">
        <thead>
         <row>
-         <entry>SQL Type</entry>
-         <entry>PHP Type</entry>
+        <entry>SQL Type</entry>
+        <entry>PHP Type</entry>
         </row>
        </thead>
        <tbody>
         <row>
-         <entry>SMALLINT, INTEGER</entry>
-         <entry><type>integer</type></entry>
+        <entry>SMALLINT, INTEGER</entry>
+        <entry><type>integer</type></entry>
         </row>
         <row>
-         <entry>NUMERIC, DECIMAL, FLOAT, REAL, DOUBLE</entry>
-         <entry><type>float</type></entry>
+        <entry>NUMERIC, DECIMAL, FLOAT, REAL, DOUBLE</entry>
+        <entry><type>float</type></entry>
         </row>
         <row>
-         <entry>DATE, TIME, TIMESTAMP</entry>
-         <entry><type>string</type></entry>
+        <entry>DATE, TIME, TIMESTAMP</entry>
+        <entry><type>string</type></entry>
         </row>
         <row>
-         <entry>VARCHAR, CHARACTER</entry>
-         <entry><type>string</type></entry>
+        <entry>VARCHAR, CHARACTER</entry>
+        <entry><type>string</type></entry>
         </row>
        </tbody>
       </tgroup>
@@ -454,18 +454,18 @@
      <example>
       <title>Creating a "multiple field" column</title>
       <programlisting role="sesam">
-       CREATE TABLE multi_field_test (
-       pkey CHAR(20) PRIMARY KEY,
-       multi(3) CHAR(12)
-       )
+CREATE TABLE multi_field_test (
+    pkey CHAR(20) PRIMARY KEY,
+    multi(3) CHAR(12)
+)
       </programlisting>
      </example>
      and can be filled in using:
      <example>
       <title>Filling a "multiple field" column</title>
       <programlisting role="sesam">
-       INSERT INTO multi_field_test (pkey, multi(2..3) )
-       VALUES ('Second', &lt;'first_val', 'second_val'&gt;)
+INSERT INTO multi_field_test (pkey, multi(2..3) )
+    VALUES ('Second', &lt;'first_val', 'second_val'&gt;)
       </programlisting>
      </example>
      Note that (like in this case) leading empty sub-fields are
@@ -482,9 +482,9 @@
    </note>
    <para>
     For specific SESAM details, please refer to <ulink
-                                                       url="&url.sesam.en;">the 
SESAM/SQL-Server documentation
-     (english)</ulink> or <ulink url="&url.sesam.de;">the
-     SESAM/SQL-Server documentation (german)</ulink>, both available
+    url="&url.sesam.en;">the SESAM/SQL-Server documentation
+    (english)</ulink> or <ulink url="&url.sesam.de;">the
+    SESAM/SQL-Server documentation (german)</ulink>, both available
     online, or use the respective manuals.
    </para>
   </partintro>
@@ -520,7 +520,7 @@
      When creating a database, the <parameter>"catalog"</parameter>
      name is specified in the SESAM configuration directive
      <command>//ADD-SQL-DATABASE-CATALOG-LIST ENTRY-1 =
-      *CATALOG(CATALOG-NAME = catalogname,...)</command>
+     *CATALOG(CATALOG-NAME = catalogname,...)</command>
     </para>
     <para>
      The <parameter>"schema"</parameter> references the desired
@@ -540,10 +540,10 @@
      <example>
       <title>Connect to a SESAM database</title>
       <programlisting role="php">
-       &lt;?php
-       if (!sesam_connect ("mycatalog", "myschema", "otto")
-       die("Unable to connect to SESAM";
-       ?&gt;
+&lt;?php
+if (!sesam_connect ("mycatalog", "myschema", "otto")
+    die("Unable to connect to SESAM";
+?&gt;
       </programlisting>
      </example>
     </para>
@@ -590,10 +590,10 @@
      <example>
       <title>Closing a SESAM connection</title>
       <programlisting role="php">
-       if (sesam_connect ("mycatalog", "myschema", "otto")) {
-       ... some queries and stuff ...
-       sesam_disconnect(); 
-       }
+if (sesam_connect ("mycatalog", "myschema", "otto")) {
+    ... some queries and stuff ...
+    sesam_disconnect(); 
+}
       </programlisting>
      </example>
     </para>
@@ -617,7 +617,7 @@
     <para>
      Returns: &true; if the values are valid, and the
      <function>settransaction</function> operation was successful,
-      &false; otherwise.
+     &false; otherwise.
     </para>
     <para>
      <function>sesam_settransaction</function> overrides the default
@@ -644,31 +644,31 @@
       <tgroup cols="3">
        <thead>
         <row>
-         <entry>Value</entry>
-         <entry>Constant</entry>
-         <entry>Meaning</entry>
+        <entry>Value</entry>
+        <entry>Constant</entry>
+        <entry>Meaning</entry>
         </row>
        </thead>
        <tbody>
         <row>
-         <entry>1</entry>
-         <entry><literal>SESAM_TXISOL_READ_UNCOMMITTED</literal></entry>
-         <entry>Read Uncommitted</entry>
+        <entry>1</entry>
+        <entry><literal>SESAM_TXISOL_READ_UNCOMMITTED</literal></entry>
+        <entry>Read Uncommitted</entry>
         </row>
         <row>
-         <entry>2</entry>
-         <entry><literal>SESAM_TXISOL_READ_COMMITTED</literal></entry>
-         <entry>Read Committed</entry>
+        <entry>2</entry>
+        <entry><literal>SESAM_TXISOL_READ_COMMITTED</literal></entry>
+        <entry>Read Committed</entry>
         </row>
         <row>
-         <entry>3</entry>
-         <entry><literal>SESAM_TXISOL_REPEATABLE_READ</literal></entry>
-         <entry>Repeatable Read</entry>
+        <entry>3</entry>
+        <entry><literal>SESAM_TXISOL_REPEATABLE_READ</literal></entry>
+        <entry>Repeatable Read</entry>
         </row>
         <row>
-         <entry>4</entry>
-         <entry><literal>SESAM_TXISOL_SERIALIZABLE</literal></entry>
-         <entry>Serializable</entry>
+        <entry>4</entry>
+        <entry><literal>SESAM_TXISOL_SERIALIZABLE</literal></entry>
+        <entry>Serializable</entry>
         </row>
        </tbody>
       </tgroup>
@@ -680,21 +680,21 @@
       <tgroup cols="3">
        <thead>
         <row>
-         <entry>Value</entry>
-         <entry>Constant</entry>
-         <entry>Meaning</entry>
+        <entry>Value</entry>
+        <entry>Constant</entry>
+        <entry>Meaning</entry>
         </row>
        </thead>
        <tbody>
         <row>
-         <entry>0</entry>
-         <entry><literal>SESAM_TXREAD_READWRITE</literal></entry>
-         <entry>Read/Write</entry>
+        <entry>0</entry>
+        <entry><literal>SESAM_TXREAD_READWRITE</literal></entry>
+        <entry>Read/Write</entry>
         </row>
         <row>
-         <entry>1</entry>
-         <entry><literal>SESAM_TXREAD_READONLY</literal></entry>
-         <entry>Read-Only</entry>
+        <entry>1</entry>
+        <entry><literal>SESAM_TXREAD_READONLY</literal></entry>
+        <entry>Read-Only</entry>
         </row>
        </tbody>
       </tgroup>
@@ -703,16 +703,16 @@
     <para>
      The values set by <function>sesam_settransaction</function> will
      override the default setting specified in the <link
-                                                         
linkend="ini.sesam-configfile">SESAM configuration file</link>.
+     linkend="ini.sesam-configfile">SESAM configuration file</link>.
     </para>
     <para>
      <example>
       <title>Setting SESAM transaction parameters</title>
       <programlisting role="php">
-       &lt;?php
-       sesam_settransaction (SESAM_TXISOL_REPEATABLE_READ,
-       SESAM_TXREAD_READONLY);
-       ?&gt;
+&lt;?php
+sesam_settransaction (SESAM_TXISOL_REPEATABLE_READ,
+                     SESAM_TXREAD_READONLY);
+?&gt;
       </programlisting>
      </example>
     </para>
@@ -736,7 +736,7 @@
     </funcsynopsis>
     <para>
      Returns: &true; on success,
-      &false; on errors
+     &false; on errors
     </para>
     <para>
      <function>sesam_commit</function> commits any pending updates to
@@ -756,14 +756,14 @@
      <example>
       <title>Committing an update to the SESAM database</title>
       <programlisting role="php">
-       &lt;?php
-       if (sesam_connect ("mycatalog", "myschema", "otto")) {
-       if (!sesam_execimm ("INSERT INTO mytable VALUES (*, 'Small Test', &lt;0, 8, 
15&gt;)"))
-       die("insert failed");
-       if (!sesam_commit())
-       die("commit failed");
-       }
-       ?&gt;
+&lt;?php
+if (sesam_connect ("mycatalog", "myschema", "otto")) {
+    if (!sesam_execimm ("INSERT INTO mytable VALUES (*, 'Small Test', &lt;0, 8, 
+15&gt;)"))
+        die("insert failed");
+    if (!sesam_commit())
+        die("commit failed");
+}
+?&gt;
       </programlisting>
      </example>
     </para>
@@ -787,7 +787,7 @@
     </funcsynopsis>
     <para>
      Returns: &true; on success,
-      &false; on errors
+     &false; on errors
     </para>
     <para>
      <function>sesam_rollback</function> discards any pending updates
@@ -805,15 +805,15 @@
      <example>
       <title>Discarding an update to the SESAM database</title>
       <programlisting role="php">
-       &lt;?php
-       if (sesam_connect ("mycatalog", "myschema", "otto")) {
-       if (sesam_execimm ("INSERT INTO mytable VALUES (*, 'Small Test', &lt;0, 8, 
15&gt;)")
-       &amp;&amp; sesam_execimm ("INSERT INTO othertable VALUES (*, 'Another Test', 
1)"))
-       sesam_commit();
-       else
-       sesam_rollback();
-       }
-       ?&gt;
+&lt;?php
+if (sesam_connect ("mycatalog", "myschema", "otto")) {
+    if (sesam_execimm ("INSERT INTO mytable VALUES (*, 'Small Test', &lt;0, 8, 
+15&gt;)")
+        &amp;&amp; sesam_execimm ("INSERT INTO othertable VALUES (*, 'Another Test', 
+1)"))
+        sesam_commit();
+    else
+        sesam_rollback();
+}
+?&gt;
       </programlisting>
      </example>
     </para>
@@ -835,7 +835,7 @@
     </funcsynopsis>
     <para>
      Returns: A SESAM "result identifier" on success, or
-      &false; on error.
+     &false; on error.
     </para>
     <para>
      <function>sesam_execimm</function> executes an "immediate"
@@ -863,10 +863,10 @@
     <para>
      <informalexample>
       <programlisting role="php">
-       $stmt = "INSERT INTO mytable VALUES ('one', 'two')";
-       $result = sesam_execimm ($stmt);
-       $err = sesam_diagnostic();
-       print ("sqlstate = ".$err["sqlstate"]."\n".
+$stmt = "INSERT INTO mytable VALUES ('one', 'two')";
+$result = sesam_execimm ($stmt);
+$err = sesam_diagnostic();
+print ("sqlstate = ".$err["sqlstate"]."\n".
        "Affected rows = ".$err["rowcount"]." == ".
        sesam_affected_rows($result)."\n");
       </programlisting>
@@ -876,7 +876,7 @@
     </para>
    </refsect1>
   </refentry>
-  
+ 
   <refentry id="function.sesam-query">
    <refnamediv>
     <refname>sesam_query</refname>
@@ -895,7 +895,7 @@
     </funcsynopsis>
     <para>
      Returns: A SESAM "result identifier" on success, or
-      &false; on error.
+     &false; on error.
     </para>
     <para>
      A "result_id" resource is used by other functions to retrieve the
@@ -937,53 +937,53 @@
        Show all rows of the "phone" table as a html table
       </title>
       <programlisting role="php">
-       &lt;?php
-       if (!sesam_connect ("phonedb", "demo", "otto"))
-       die ("cannot connect");
-       $result = sesam_query ("select * from phone");
-       if (!$result) {
-       $err = sesam_diagnostic();
-       die ($err["errmsg"]);
-       }
-       echo "&lt;TABLE BORDER&gt;\n";
-       // Add title header with column names above the result:
-       if ($cols = sesam_field_array ($result)) {
-       echo " &lt;TR&gt;&lt;TH 
COLSPAN=".$cols["count"]."&gt;Result:&lt;/TH&gt;&lt;/TR&gt;\n";
-       echo " &lt;TR&gt;\n";
-       for ($col = 0; $col &lt; $cols["count"]; ++$col) {
-       $colattr = $cols[$col];
-       /* Span the table head over SESAM's "Multiple Fields": */
-       if ($colattr["count"] &gt; 1) {
-       echo "  &lt;TH COLSPAN=".$colattr["count"]."&gt;".$colattr["name"].
-       "(1..".$colattr["count"].")&lt;/TH&gt;\n";
-       $col += $colattr["count"] - 1;
-       } else
-       echo "  &lt;TH&gt;" . $colattr["name"] . "&lt;/TH&gt;\n";
-       }
-       echo " &lt;/TR&gt;\n";
-       }
+&lt;?php
+if (!sesam_connect ("phonedb", "demo", "otto"))
+    die ("cannot connect");
+$result = sesam_query ("select * from phone");
+if (!$result) {
+    $err = sesam_diagnostic();
+    die ($err["errmsg"]);
+}
+echo "&lt;TABLE BORDER&gt;\n";
+// Add title header with column names above the result:
+if ($cols = sesam_field_array ($result)) {
+    echo " &lt;TR&gt;&lt;TH 
+COLSPAN=".$cols["count"]."&gt;Result:&lt;/TH&gt;&lt;/TR&gt;\n";
+    echo " &lt;TR&gt;\n";
+    for ($col = 0; $col &lt; $cols["count"]; ++$col) {
+        $colattr = $cols[$col];
+        /* Span the table head over SESAM's "Multiple Fields": */
+        if ($colattr["count"] &gt; 1) {
+            echo "  &lt;TH COLSPAN=".$colattr["count"]."&gt;".$colattr["name"].
+                "(1..".$colattr["count"].")&lt;/TH&gt;\n";
+            $col += $colattr["count"] - 1;
+        } else
+            echo "  &lt;TH&gt;" . $colattr["name"] . "&lt;/TH&gt;\n";
+    }
+    echo " &lt;/TR&gt;\n";
+}
 
-       do {
-       // Fetch the result in chunks of 100 rows max.
-       $ok = sesam_fetch_result ($result, 100);
-       for ($row=0; $row &lt; $ok["rows"]; ++$row) {
-       echo " &lt;TR&gt;\n";
-       for ($col = 0; $col &lt; $ok["cols"]; ++$col) {
-       if (isset($ok[$col][$row]))
-       echo "  &lt;TD&gt;" . $ok[$col][$row] . "&lt;/TD&gt;\n";
-       } else {
-       echo "  &lt;TD&gt;-empty-&lt;/TD&gt;\n";
-       }
-       }
-       echo " &lt;/TR&gt;\n";
-       }
-       } 
-       while ($ok["truncated"]) { // while there may be more data
-       echo "&lt;/TABLE&gt;\n";
-       }
-       // free result id
-       sesam_free_result($result);
-       ?&gt;
+do {
+    // Fetch the result in chunks of 100 rows max.
+    $ok = sesam_fetch_result ($result, 100);
+    for ($row=0; $row &lt; $ok["rows"]; ++$row) {
+        echo " &lt;TR&gt;\n";
+        for ($col = 0; $col &lt; $ok["cols"]; ++$col) {
+            if (isset($ok[$col][$row]))
+                echo "  &lt;TD&gt;" . $ok[$col][$row] . "&lt;/TD&gt;\n";
+            } else {
+                echo "  &lt;TD&gt;-empty-&lt;/TD&gt;\n";
+            }
+        }
+        echo " &lt;/TR&gt;\n";
+    }
+} 
+while ($ok["truncated"]) { // while there may be more data
+    echo "&lt;/TABLE&gt;\n";
+}
+// free result id
+sesam_free_result($result);
+?&gt;
       </programlisting>
      </example>
     </para>
@@ -1011,7 +1011,7 @@
      result.  Returns an integer describing the total number of
      columns (aka.  fields) in the current
      <parameter>result_id</parameter> result set or
-      &false; on error.
+     &false; on error.
     </para>
     <para>
      For "immediate" statements, the value zero is returned. The SESAM
@@ -1025,7 +1025,7 @@
     </para>
    </refsect1>
   </refentry>
-  
+ 
   <refentry id="function.sesam-field-name">
    <refnamediv>
     <refname>sesam_field_name</refname>
@@ -1088,45 +1088,45 @@
       <tgroup cols="2">
        <thead>
         <row>
-         <entry>Element</entry>
-         <entry>Contents</entry>
+        <entry>Element</entry>
+        <entry>Contents</entry>
         </row>
        </thead>
        <tbody>
         <row>
-         <entry>$array["sqlstate"]</entry>
-         <entry>
-          5 digit SQL return code (see the SESAM manual for the
-          description of the possible values of SQLSTATE)
-         </entry>
-        </row>
-        <row>
-         <entry>$array["rowcount"]</entry>
-         <entry>
-          number of affected rows in last update/insert/delete (set
-          after "immediate" statements only)
-         </entry>
-        </row>
-        <row>
-         <entry>$array["errmsg"]</entry>
-         <entry>
-          "human readable" error message string (set after errors
-          only)
-         </entry>
-        </row>
-        <row>
-         <entry>$array["errcol"]</entry>
-         <entry>
-          error column number of previous error (0-based; or -1 if
-          undefined. Set after errors only)
-         </entry>
-        </row>
-        <row>
-         <entry>$array["errlin"]</entry>
-         <entry>
-          error line number of previous error (0-based; or -1 if
-          undefined. Set after errors only)
-         </entry>
+        <entry>$array["sqlstate"]</entry>
+        <entry>
+         5 digit SQL return code (see the SESAM manual for the
+         description of the possible values of SQLSTATE)
+        </entry>
+        </row>
+        <row>
+        <entry>$array["rowcount"]</entry>
+        <entry>
+         number of affected rows in last update/insert/delete (set
+         after "immediate" statements only)
+        </entry>
+        </row>
+        <row>
+        <entry>$array["errmsg"]</entry>
+        <entry>
+         "human readable" error message string (set after errors
+         only)
+        </entry>
+        </row>
+        <row>
+        <entry>$array["errcol"]</entry>
+        <entry>
+         error column number of previous error (0-based; or -1 if
+         undefined. Set after errors only)
+        </entry>
+        </row>
+        <row>
+        <entry>$array["errlin"]</entry>
+        <entry>
+         error line number of previous error (0-based; or -1 if
+         undefined. Set after errors only)
+        </entry>
         </row>
        </tbody>
       </tgroup>
@@ -1139,70 +1139,70 @@
      <example>
       <title>Displaying SESAM error messages with error position</title>
       <programlisting role="php">
-       &lt;?php
-       // Function which prints a formatted error message,
-       // displaying a pointer to the syntax error in the
-       // SQL statement
-       function PrintReturncode ($exec_str) {
-       $err = Sesam_Diagnostic();
-       $colspan=4; // 4 cols for: sqlstate, errlin, errcol, rowcount
-       if ($err["errlin"] == -1)
-       --$colspan;
-       if ($err["errcol"] == -1)
-       --$colspan;
-       if ($err["rowcount"] == 0)
-       --$colspan;
-       echo "&lt;TABLE BORDER&gt;\n";
-       echo "&lt;TR&gt;&lt;TH COLSPAN=".$colspan."&gt;&lt;FONT 
COLOR=red&gt;ERROR:&lt;/FONT&gt; ".
-       htmlspecialchars($err["errmsg"])."&lt;/TH&gt;&lt;/TR&gt;\n";
-       if ($err["errcol"] &gt;= 0) {
-       echo "&lt;TR&gt;&lt;TD COLSPAN=".$colspan."&gt;&lt;PRE&gt;\n";
-       $errstmt = $exec_str."\n";
-       for ($lin=0; $errstmt != ""; ++$lin) {
-       if ($lin != $err["errlin"]) { // $lin is less or greater than errlin
-       if (!($i = strchr ($errstmt, "\n")))
-       $i = "";
-       $line = substr ($errstmt, 0, strlen($errstmt)-strlen($i)+1);
-       $errstmt = substr($i, 1);
-       if ($line != "\n")
-       print htmlspecialchars ($line);
-       } else {
-       if (! ($i = strchr ($errstmt, "\n")))
-       $i = "";
-       $line = substr ($errstmt, 0, strlen ($errstmt)-strlen($i)+1);
-       $errstmt = substr($i, 1);
-       for ($col=0; $col &lt; $err["errcol"]; ++$col)
-       echo (substr($line, $col, 1) == "\t") ? "\t" : ".";
-       echo "&lt;FONT COLOR=RED&gt;&lt;BLINK&gt;\\&lt;/BLINK&gt;&lt;/FONT&gt;\n";
-       print "&lt;FONT COLOR=\"#880000\"&gt;".htmlspecialchars($line)."&lt;/FONT&gt;";
-       for ($col=0; $col &lt; $err["errcol"]; ++$col)
-       echo (substr ($line, $col, 1) == "\t") ? "\t" : ".";
-       echo "&lt;FONT COLOR=RED&gt;&lt;BLINK&gt;/&lt;/BLINK&gt;&lt;/FONT&gt;\n";
-       }
-       }
-       echo "&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;\n";
-       }
-       echo "&lt;TR&gt;\n";
-       echo " &lt;TD&gt;sqlstate=" . $err["sqlstate"] . "&lt;/TD&gt;\n";
-       if ($err["errlin"] != -1)
-       echo " &lt;TD&gt;errlin=" . $err["errlin"] . "&lt;/TD&gt;\n";
-       if ($err["errcol"] != -1)
-       echo " &lt;TD&gt;errcol=" . $err["errcol"] . "&lt;/TD&gt;\n";
-       if ($err["rowcount"] != 0)
-       echo " &lt;TD&gt;rowcount=" . $err["rowcount"] . "&lt;/TD&gt;\n";
-       echo "&lt;/TR&gt;\n";
-       echo "&lt;/TABLE&gt;\n";
-       }
+&lt;?php
+// Function which prints a formatted error message,
+// displaying a pointer to the syntax error in the
+// SQL statement
+function PrintReturncode ($exec_str) {
+    $err = Sesam_Diagnostic();
+    $colspan=4; // 4 cols for: sqlstate, errlin, errcol, rowcount
+    if ($err["errlin"] == -1)
+        --$colspan;
+    if ($err["errcol"] == -1)
+        --$colspan;
+    if ($err["rowcount"] == 0)
+        --$colspan;
+    echo "&lt;TABLE BORDER&gt;\n";
+    echo "&lt;TR&gt;&lt;TH COLSPAN=".$colspan."&gt;&lt;FONT 
+COLOR=red&gt;ERROR:&lt;/FONT&gt; ".
+               htmlspecialchars($err["errmsg"])."&lt;/TH&gt;&lt;/TR&gt;\n";
+    if ($err["errcol"] &gt;= 0) {
+        echo "&lt;TR&gt;&lt;TD COLSPAN=".$colspan."&gt;&lt;PRE&gt;\n";
+        $errstmt = $exec_str."\n";
+        for ($lin=0; $errstmt != ""; ++$lin) {
+            if ($lin != $err["errlin"]) { // $lin is less or greater than errlin
+                if (!($i = strchr ($errstmt, "\n")))
+                    $i = "";
+                $line = substr ($errstmt, 0, strlen($errstmt)-strlen($i)+1);
+                $errstmt = substr($i, 1);
+                if ($line != "\n")
+                    print htmlspecialchars ($line);
+            } else {
+                if (! ($i = strchr ($errstmt, "\n")))
+                    $i = "";
+                $line = substr ($errstmt, 0, strlen ($errstmt)-strlen($i)+1);
+                $errstmt = substr($i, 1);
+                for ($col=0; $col &lt; $err["errcol"]; ++$col)
+                    echo (substr($line, $col, 1) == "\t") ? "\t" : ".";
+                echo "&lt;FONT 
+COLOR=RED&gt;&lt;BLINK&gt;\\&lt;/BLINK&gt;&lt;/FONT&gt;\n";
+                print "&lt;FONT 
+COLOR=\"#880000\"&gt;".htmlspecialchars($line)."&lt;/FONT&gt;";
+                for ($col=0; $col &lt; $err["errcol"]; ++$col)
+                    echo (substr ($line, $col, 1) == "\t") ? "\t" : ".";
+                echo "&lt;FONT 
+COLOR=RED&gt;&lt;BLINK&gt;/&lt;/BLINK&gt;&lt;/FONT&gt;\n";
+            }
+        }
+        echo "&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;\n";
+    }
+    echo "&lt;TR&gt;\n";
+    echo " &lt;TD&gt;sqlstate=" . $err["sqlstate"] . "&lt;/TD&gt;\n";
+    if ($err["errlin"] != -1)
+        echo " &lt;TD&gt;errlin=" . $err["errlin"] . "&lt;/TD&gt;\n";
+    if ($err["errcol"] != -1)
+        echo " &lt;TD&gt;errcol=" . $err["errcol"] . "&lt;/TD&gt;\n";
+    if ($err["rowcount"] != 0)
+         echo " &lt;TD&gt;rowcount=" . $err["rowcount"] . "&lt;/TD&gt;\n";
+    echo "&lt;/TR&gt;\n";
+    echo "&lt;/TABLE&gt;\n";
+}
 
-       if (!sesam_connect ("mycatalog", "phoneno", "otto"))
-       die ("cannot connect");
+if (!sesam_connect ("mycatalog", "phoneno", "otto"))
+  die ("cannot connect");
 
-       $stmt = "SELECT * FROM phone\n".
-       " WHERE@ LASTNAME='KRAEMER'\n".
-       " ORDER BY FIRSTNAME";
-       if (!($result = sesam_query ($stmt)))
-       PrintReturncode ($stmt);
-       ?&gt;
+$stmt = "SELECT * FROM phone\n".
+        " WHERE@ LASTNAME='KRAEMER'\n".
+        " ORDER BY FIRSTNAME";
+if (!($result = sesam_query ($stmt)))
+    PrintReturncode ($stmt);
+?&gt;
       </programlisting>
      </example>
     </para>
@@ -1242,54 +1242,54 @@
       <tgroup cols="2">
        <thead>
         <row>
-         <entry>Array Element</entry>
-         <entry>Contents</entry>
+        <entry>Array Element</entry>
+        <entry>Contents</entry>
         </row>
        </thead>
        <tbody>
         <row>
-         <entry>int $arr["count"]</entry>
-         <entry>
-          number of columns in result set (or zero if this was an
-          "immediate" query)
-         </entry>
-        </row>
-        <row>
-         <entry>int $arr["rows"]</entry>
-         <entry>
-          number of rows in result set (between zero and
-          <parameter>max_rows</parameter>)
-         </entry>
-        </row>
-        <row>
-         <entry>boolean $arr["truncated"]</entry>
-         <entry>
-           &true; if the number of rows was at least
-          <parameter>max_rows</parameter>, &false;
-          otherwise. Note that even when this is
-           &true;, the next
-          <function>sesam_fetch_result</function> call may return zero
-          rows because there are no more result entries.
-         </entry>
-        </row>
-        <row>
-         <entry>mixed $arr[col][row]</entry>
-         <entry>
-          result data for all the fields at
-          row(<literal>row</literal>) and
-          column(<literal>col</literal>), (where the integer index
-          <literal>row</literal> is between 0 and
-          <literal>$arr["rows"]-1</literal>, and
-          <literal>col</literal> is between 0 and
-          <literal>$arr["count"]-1</literal>). Fields may be empty, so
-          you must check for the existence of a field by using the php
-          <function>isset</function> function. The type of the
-          returned fields depend on the respective SQL type declared
-          for its column (see <link linkend="ref.sesam">SESAM
-           overview</link> for the conversions applied). SESAM
-          "multiple fields" are "inlined" and treated like a sequence
-          of columns.
-         </entry>
+        <entry>int $arr["count"]</entry>
+        <entry>
+         number of columns in result set (or zero if this was an
+         "immediate" query)
+        </entry>
+        </row>
+        <row>
+        <entry>int $arr["rows"]</entry>
+        <entry>
+         number of rows in result set (between zero and
+         <parameter>max_rows</parameter>)
+        </entry>
+        </row>
+        <row>
+        <entry>boolean $arr["truncated"]</entry>
+        <entry>
+         &true; if the number of rows was at least
+         <parameter>max_rows</parameter>, &false;
+         otherwise. Note that even when this is
+         &true;, the next
+         <function>sesam_fetch_result</function> call may return zero
+         rows because there are no more result entries.
+        </entry>
+        </row>
+        <row>
+       <entry>mixed $arr[col][row]</entry>
+        <entry>
+         result data for all the fields at
+         row(<literal>row</literal>) and
+         column(<literal>col</literal>), (where the integer index
+         <literal>row</literal> is between 0 and
+         <literal>$arr["rows"]-1</literal>, and
+         <literal>col</literal> is between 0 and
+         <literal>$arr["count"]-1</literal>). Fields may be empty, so
+         you must check for the existence of a field by using the php
+         <function>isset</function> function. The type of the
+         returned fields depend on the respective SQL type declared
+         for its column (see <link linkend="ref.sesam">SESAM
+         overview</link> for the conversions applied). SESAM
+         "multiple fields" are "inlined" and treated like a sequence
+         of columns.
+        </entry>
         </row>
        </tbody>
       </tgroup>
@@ -1350,12 +1350,12 @@
     </para>
     <informalexample>
      <programlisting role="php">
-      $result = sesam_execimm ("DELETE FROM PHONE WHERE LASTNAME = '".strtoupper 
($name)."'");
-      if (!$result) {
-      ... error ...
-      }
-      print sesam_affected_rows ($result).
-      " entries with last name ".$name." deleted.\n"
+$result = sesam_execimm ("DELETE FROM PHONE WHERE LASTNAME = '".strtoupper 
+($name)."'");
+if (!$result) {
+    ... error ...
+}
+print sesam_affected_rows ($result).
+    " entries with last name ".$name." deleted.\n"
      </programlisting>
     </informalexample>
    </refsect1>
@@ -1380,8 +1380,8 @@
     </para>
     <informalexample>
      <programlisting role="php">
-      if (!sesam_execimm ($stmt))
-      printf ("%s&lt;br&gt;\n", sesam_errormsg());
+if (!sesam_execimm ($stmt))
+  printf ("%s&lt;br&gt;\n", sesam_errormsg());
      </programlisting>
     </informalexample>
     <para>
@@ -1424,158 +1424,158 @@
       <tgroup cols="2">
        <thead>
         <row>
-         <entry>Array Element</entry>
-         <entry>Contents</entry>
+        <entry>Array Element</entry>
+        <entry>Contents</entry>
         </row>
        </thead>
        <tbody>
         <row>
-         <entry>int $arr["count"]</entry>
-         <entry>
-          Total number of columns in result set (or zero if this was
-          an "immediate" query).  SESAM "multiple fields" are
-          "inlined" and treated like the respective number of columns.
-         </entry>
-        </row>
-        <row>
-         <entry>string $arr[col]["name"]</entry>
-         <entry>
-          column name for column(<literal>col</literal>), where
-          <literal>col</literal> is between 0 and
-          <literal>$arr["count"]-1</literal>. The returned value can
-          be the empty string (for dynamically computed
-          columns). SESAM "multiple fields" are "inlined" and treated
-          like the respective number of columns, each with the same
-          column name.
-         </entry>
-        </row>
-        <row>
-         <entry>string $arr[col]["count"]</entry>
-         <entry>
-          The "count" attribute describes the repetition factor when
-          the column has been declared as a "multiple field". Usually,
-          the "count" attribute is 1. The first column of a "multiple
-          field" column however contains the number of repetitions
-          (the second and following column of the "multiple field"
-          contain a "count" attribute of 1). This can be used to
-          detect "multiple fields" in the result set. See the example
-          shown in the <function>sesam_query</function> description
-          for a sample use of the "count" attribute.
-         </entry>
-        </row>
-        <row>
-         <entry>string $arr[col]["type"]</entry>
-         <entry>
-          php variable type of the data for
-          column(<literal>col</literal>), where <literal>col</literal>
-          is between 0 and <literal>$arr["count"]-1</literal>. The
-          returned value can be one of
-     <itemizedlist>
-      <listitem>
-       <simpara><type>integer</type></simpara>
-      </listitem>
-      <listitem>
-       <simpara><type>float</type></simpara>
-      </listitem>
-      <listitem>
-       <simpara><type>string</type></simpara>
-      </listitem>
-     </itemizedlist>
-     depending on the SQL type of the result.  SESAM "multiple
-     fields" are "inlined" and treated like the respective number
-     of columns, each with the same php type.
-    </entry>
-    </row>
-     <row>
-      <entry>string $arr[col]["sqltype"]</entry>
-      <entry>
-       SQL variable type of the column data for
-       column(<literal>col</literal>), where <literal>col</literal>
-       is between 0 and <literal>$arr["count"]-1</literal>. The
-       returned value can be one of
-     <itemizedlist>
-      <listitem>
-       <simpara>"CHARACTER"</simpara>
-      </listitem>
-      <listitem>
-       <simpara>"VARCHAR"</simpara>
-      </listitem>
-      <listitem>
-       <simpara>"NUMERIC"</simpara>
-      </listitem>
-      <listitem>
-       <simpara>"DECIMAL"</simpara>
-      </listitem>
-      <listitem>
-       <simpara>"INTEGER"</simpara>
-      </listitem>
-      <listitem>
-       <simpara>"SMALLINT"</simpara>
-      </listitem>
-      <listitem>
-       <simpara>"FLOAT"</simpara>
-      </listitem>
-      <listitem>
-       <simpara>"REAL"</simpara>
-      </listitem>
-      <listitem>
-       <simpara>"DOUBLE"</simpara>
-      </listitem>
-      <listitem>
-       <simpara>"DATE"</simpara>
-      </listitem>
-      <listitem>
-       <simpara>"TIME"</simpara>
-      </listitem>
-      <listitem>
-       <simpara>"TIMESTAMP"</simpara>
-      </listitem>
-     </itemizedlist>
-     describing the SQL type of the result.  SESAM "multiple
-     fields" are "inlined" and treated like the respective number
-     of columns, each with the same SQL type.
-    </entry>
-    </row>
-     <row>
-      <entry>string $arr[col]["length"]</entry>
-      <entry>
-       The SQL "length" attribute of the SQL variable in
-       column(<literal>col</literal>), where <literal>col</literal>
-       is between 0 and <literal>$arr["count"]-1</literal>. The
-       "length" attribute is used with "CHARACTER" and "VARCHAR"
-       SQL types to specify the (maximum) length of the string
-       variable.  SESAM "multiple fields" are "inlined" and treated
-       like the respective number of columns, each with the same
-       length attribute.
-      </entry>
-     </row>
-     <row>
-      <entry>string $arr[col]["precision"]</entry>
-      <entry>
-       The "precision" attribute of the SQL variable in
-       column(<literal>col</literal>), where <literal>col</literal>
-       is between 0 and <literal>$arr["count"]-1</literal>. The
-       "precision" attribute is used with numeric and time data
-       types.  SESAM "multiple fields" are "inlined" and treated
-       like the respective number of columns, each with the same
-       precision attribute.
-      </entry>
-     </row>
-     <row>
-      <entry>string $arr[col]["scale"]</entry>
-      <entry>
-       The "scale" attribute of the SQL variable in
-       column(<literal>col</literal>), where <literal>col</literal>
-       is between 0 and <literal>$arr["count"]-1</literal>. The
-       "scale" attribute is used with numeric data types.  SESAM
-       "multiple fields" are "inlined" and treated like the
-       respective number of columns, each with the same scale
-       attribute.
-      </entry>
-     </row>
-    </tbody>
-    </tgroup>
-    </table>
+        <entry>int $arr["count"]</entry>
+        <entry>
+         Total number of columns in result set (or zero if this was
+         an "immediate" query).  SESAM "multiple fields" are
+         "inlined" and treated like the respective number of columns.
+        </entry>
+        </row>
+        <row>
+        <entry>string $arr[col]["name"]</entry>
+        <entry>
+         column name for column(<literal>col</literal>), where
+         <literal>col</literal> is between 0 and
+         <literal>$arr["count"]-1</literal>. The returned value can
+         be the empty string (for dynamically computed
+         columns). SESAM "multiple fields" are "inlined" and treated
+         like the respective number of columns, each with the same
+         column name.
+        </entry>
+        </row>
+        <row>
+       <entry>string $arr[col]["count"]</entry>
+       <entry>
+         The "count" attribute describes the repetition factor when
+         the column has been declared as a "multiple field". Usually,
+         the "count" attribute is 1. The first column of a "multiple
+         field" column however contains the number of repetitions
+         (the second and following column of the "multiple field"
+         contain a "count" attribute of 1). This can be used to
+         detect "multiple fields" in the result set. See the example
+         shown in the <function>sesam_query</function> description
+         for a sample use of the "count" attribute.
+        </entry>
+        </row>
+        <row>
+        <entry>string $arr[col]["type"]</entry>
+        <entry>
+         php variable type of the data for
+         column(<literal>col</literal>), where <literal>col</literal>
+         is between 0 and <literal>$arr["count"]-1</literal>. The
+         returned value can be one of
+          <itemizedlist>
+           <listitem>
+            <simpara><type>integer</type></simpara>
+           </listitem>
+           <listitem>
+            <simpara><type>float</type></simpara>
+           </listitem>
+           <listitem>
+            <simpara><type>string</type></simpara>
+           </listitem>
+          </itemizedlist>
+         depending on the SQL type of the result.  SESAM "multiple
+         fields" are "inlined" and treated like the respective number
+         of columns, each with the same php type.
+        </entry>
+       </row>
+       <row>
+        <entry>string $arr[col]["sqltype"]</entry>
+        <entry>
+         SQL variable type of the column data for
+         column(<literal>col</literal>), where <literal>col</literal>
+         is between 0 and <literal>$arr["count"]-1</literal>. The
+         returned value can be one of
+          <itemizedlist>
+           <listitem>
+            <simpara>"CHARACTER"</simpara>
+           </listitem>
+           <listitem>
+            <simpara>"VARCHAR"</simpara>
+           </listitem>
+           <listitem>
+            <simpara>"NUMERIC"</simpara>
+           </listitem>
+           <listitem>
+            <simpara>"DECIMAL"</simpara>
+           </listitem>
+           <listitem>
+            <simpara>"INTEGER"</simpara>
+           </listitem>
+           <listitem>
+            <simpara>"SMALLINT"</simpara>
+           </listitem>
+           <listitem>
+            <simpara>"FLOAT"</simpara>
+           </listitem>
+           <listitem>
+            <simpara>"REAL"</simpara>
+           </listitem>
+           <listitem>
+            <simpara>"DOUBLE"</simpara>
+           </listitem>
+           <listitem>
+            <simpara>"DATE"</simpara>
+           </listitem>
+           <listitem>
+            <simpara>"TIME"</simpara>
+           </listitem>
+           <listitem>
+            <simpara>"TIMESTAMP"</simpara>
+           </listitem>
+          </itemizedlist>
+         describing the SQL type of the result.  SESAM "multiple
+         fields" are "inlined" and treated like the respective number
+         of columns, each with the same SQL type.
+        </entry>
+       </row>
+       <row>
+        <entry>string $arr[col]["length"]</entry>
+        <entry>
+         The SQL "length" attribute of the SQL variable in
+         column(<literal>col</literal>), where <literal>col</literal>
+         is between 0 and <literal>$arr["count"]-1</literal>. The
+         "length" attribute is used with "CHARACTER" and "VARCHAR"
+         SQL types to specify the (maximum) length of the string
+         variable.  SESAM "multiple fields" are "inlined" and treated
+         like the respective number of columns, each with the same
+         length attribute.
+        </entry>
+       </row>
+       <row>
+        <entry>string $arr[col]["precision"]</entry>
+        <entry>
+         The "precision" attribute of the SQL variable in
+         column(<literal>col</literal>), where <literal>col</literal>
+         is between 0 and <literal>$arr["count"]-1</literal>. The
+         "precision" attribute is used with numeric and time data
+         types.  SESAM "multiple fields" are "inlined" and treated
+         like the respective number of columns, each with the same
+         precision attribute.
+        </entry>
+       </row>
+       <row>
+        <entry>string $arr[col]["scale"]</entry>
+        <entry>
+         The "scale" attribute of the SQL variable in
+         column(<literal>col</literal>), where <literal>col</literal>
+         is between 0 and <literal>$arr["count"]-1</literal>. The
+         "scale" attribute is used with numeric data types.  SESAM
+         "multiple fields" are "inlined" and treated like the
+         respective number of columns, each with the same scale
+         attribute.
+        </entry>
+       </row>
+       </tbody>
+      </tgroup>
+     </table>
     </para>
     <para>
      See the <function>sesam_query</function> function for an example
@@ -1605,7 +1605,7 @@
     </funcsynopsis>
     <para>
      Returns an array that corresponds to the fetched row, or
-      &false; if there are no more rows.
+     &false; if there are no more rows.
     </para>
     <para>
      The number of columns in the result set is returned in an
@@ -1627,63 +1627,63 @@
       <tgroup cols="3">
        <thead>
         <row>
-         <entry>Value</entry>
-         <entry>Constant</entry>
-         <entry>Meaning</entry>
+        <entry>Value</entry>
+        <entry>Constant</entry>
+        <entry>Meaning</entry>
         </row>
        </thead>
        <tbody>
         <row>
-         <entry>0</entry>
-         <entry><literal>SESAM_SEEK_NEXT</literal></entry>
-         <entry>
-          read sequentially (after fetch, the internal default is set
-          to <literal>SESAM_SEEK_NEXT</literal>)
-         </entry>
-        </row>
-        <row>
-         <entry>1</entry>
-         <entry><literal>SESAM_SEEK_PRIOR</literal></entry>
-         <entry>
-          read sequentially backwards (after fetch, the internal
-          default is set to <literal>SESAM_SEEK_PRIOR</literal>)
-         </entry>
-        </row>
-        <row>
-         <entry>2</entry>
-         <entry><literal>SESAM_SEEK_FIRST</literal></entry>
-         <entry>
-          rewind to first row (after fetch, the default is set to
-          <literal>SESAM_SEEK_NEXT</literal>)
-         </entry>
-        </row>
-        <row>
-         <entry>3</entry>
-         <entry><literal>SESAM_SEEK_LAST</literal></entry>
-         <entry>
-          seek to last row (after fetch, the default is set to
-          <literal>SESAM_SEEK_PRIOR</literal>)
-         </entry>
-        </row>
-        <row>
-         <entry>4</entry>
-         <entry><literal>SESAM_SEEK_ABSOLUTE</literal></entry>
-         <entry>
-          seek to absolute row number given as
-          <parameter>offset</parameter> (Zero-based. After fetch, the
-          internal default is set to
-          <literal>SESAM_SEEK_ABSOLUTE</literal>, and the internal
-          offset value is auto-incremented)
-         </entry>
-        </row>
-        <row>
-         <entry>5</entry>
-         <entry><literal>SESAM_SEEK_RELATIVE</literal></entry>
-         <entry>
-          seek relative to current scroll position, where
-          <parameter>offset</parameter> can be a positive or negative
-          offset value.
-         </entry>
+        <entry>0</entry>
+        <entry><literal>SESAM_SEEK_NEXT</literal></entry>
+        <entry>
+         read sequentially (after fetch, the internal default is set
+         to <literal>SESAM_SEEK_NEXT</literal>)
+        </entry>
+        </row>
+        <row>
+        <entry>1</entry>
+        <entry><literal>SESAM_SEEK_PRIOR</literal></entry>
+        <entry>
+         read sequentially backwards (after fetch, the internal
+         default is set to <literal>SESAM_SEEK_PRIOR</literal>)
+        </entry>
+        </row>
+        <row>
+        <entry>2</entry>
+        <entry><literal>SESAM_SEEK_FIRST</literal></entry>
+        <entry>
+         rewind to first row (after fetch, the default is set to
+         <literal>SESAM_SEEK_NEXT</literal>)
+        </entry>
+        </row>
+        <row>
+        <entry>3</entry>
+        <entry><literal>SESAM_SEEK_LAST</literal></entry>
+        <entry>
+         seek to last row (after fetch, the default is set to
+         <literal>SESAM_SEEK_PRIOR</literal>)
+        </entry>
+        </row>
+        <row>
+        <entry>4</entry>
+        <entry><literal>SESAM_SEEK_ABSOLUTE</literal></entry>
+        <entry>
+         seek to absolute row number given as
+         <parameter>offset</parameter> (Zero-based. After fetch, the
+         internal default is set to
+         <literal>SESAM_SEEK_ABSOLUTE</literal>, and the internal
+         offset value is auto-incremented)
+        </entry>
+        </row>
+        <row>
+        <entry>5</entry>
+        <entry><literal>SESAM_SEEK_RELATIVE</literal></entry>
+       <entry>
+         seek relative to current scroll position, where
+         <parameter>offset</parameter> can be a positive or negative
+         offset value.
+        </entry>
         </row>
        </tbody>
       </tgroup>
@@ -1717,40 +1717,40 @@
      field by using the php <function>isset</function> function. The
      type of the returned fields depend on the respective SQL type
      declared for its column (see <link linkend="ref.sesam">SESAM
-      overview</link> for the conversions applied). SESAM "multiple
+     overview</link> for the conversions applied). SESAM "multiple
      fields" are "inlined" and treated like a sequence of columns.
     </para>
     <para>
      Subsequent calls to <function>sesam_fetch_row</function> would
      return the next (or prior, or n'th next/prior, depending on the
      scroll attributes) row in the result set, or
-      &false; if there are no more rows.
+     &false; if there are no more rows.
     </para>
     <example>
      <title>SESAM fetch rows</title>
      <programlisting role="php">
-      &lt;?php
-      $result = sesam_query (&quot;SELECT * FROM phone\n&quot;.
-      &quot;  WHERE LASTNAME='&quot;.strtoupper($name).&quot;'\n&quot;.
-      &quot;  ORDER BY FIRSTNAME&quot;, 1);
-      if (!$result) {
-      ... error ...
-      }
-      // print the table in backward order
-      print &quot;&lt;TABLE BORDER&gt;\n&quot;;
-      $row = sesam_fetch_row ($result, SESAM_SEEK_LAST);
-      while (is_array ($row)) {
-      print &quot; &lt;TR&gt;\n&quot;;
-      for ($col = 0; $col &lt; $row[&quot;count&quot;]; ++$col) {
-      print &quot;  &lt;TD&gt;&quot;.htmlspecialchars 
($row[$col]).&quot;&lt;/TD&gt;\n&quot;;
-      }
-      print &quot; &lt;/TR&gt;\n&quot;;
-      // use implied SESAM_SEEK_PRIOR
-      $row = sesam_fetch_row ($result);
-      }
-      print &quot;&lt;/TABLE&gt;\n&quot;;
-      sesam_free_result ($result);
-      ?&gt;
+&lt;?php
+$result = sesam_query (&quot;SELECT * FROM phone\n&quot;.
+                       &quot;  WHERE 
+LASTNAME='&quot;.strtoupper($name).&quot;'\n&quot;.
+                       &quot;  ORDER BY FIRSTNAME&quot;, 1);
+if (!$result) {
+    ... error ...
+}
+// print the table in backward order
+print &quot;&lt;TABLE BORDER&gt;\n&quot;;
+$row = sesam_fetch_row ($result, SESAM_SEEK_LAST);
+while (is_array ($row)) {
+    print &quot; &lt;TR&gt;\n&quot;;
+    for ($col = 0; $col &lt; $row[&quot;count&quot;]; ++$col) {
+        print &quot;  &lt;TD&gt;&quot;.htmlspecialchars 
+($row[$col]).&quot;&lt;/TD&gt;\n&quot;;
+    }
+    print &quot; &lt;/TR&gt;\n&quot;;
+    // use implied SESAM_SEEK_PRIOR
+    $row = sesam_fetch_row ($result);
+}
+print &quot;&lt;/TABLE&gt;\n&quot;;
+sesam_free_result ($result);
+?&gt;
      </programlisting>
     </example>
     <para>
@@ -1782,7 +1782,7 @@
     </funcsynopsis>
     <para>
      Returns an array that corresponds to the fetched row, or
-      &false; if there are no more rows.
+     &false; if there are no more rows.
     </para>
     <para>
      <function>sesam_fetch_array</function> is an alternative version
@@ -1817,7 +1817,7 @@
      the column.
      <informalexample>
       <programlisting>
-       SELECT TBL1.COL AS FOO, TBL2.COL AS BAR FROM TBL1, TBL2</programlisting>
+SELECT TBL1.COL AS FOO, TBL2.COL AS BAR FROM TBL1, TBL2</programlisting>
      </informalexample>
     </para>
     <para>
@@ -1831,7 +1831,7 @@
      declared as:
      <informalexample>
       <programlisting role="sesam">
-       CREATE TABLE ... ( ... MULTI(3) INT )
+CREATE TABLE ... ( ... MULTI(3) INT )
       </programlisting>
      </informalexample>
      the associative indices used for the individual "multiple field"
@@ -1843,30 +1843,30 @@
      Subsequent calls to <function>sesam_fetch_array</function> would
      return the next (or prior, or n'th next/prior, depending on the
      scroll attributes) row in the result set, or
-      &false; if there are no more rows.
+     &false; if there are no more rows.
     </para>
     <example>
      <title>SESAM fetch array</title>
      <programlisting role="php">
-      &lt;?php
-      $result = sesam_query (&quot;SELECT * FROM phone\n&quot;.
-      &quot;  WHERE LASTNAME='&quot;.strtoupper($name).&quot;'\n&quot;.
-      &quot;  ORDER BY FIRSTNAME&quot;, 1);
-      if (!$result) {
-      ... error ...
-      }
-      // print the table:
-      print &quot;&lt;TABLE BORDER&gt;\n&quot;;
-      while (($row = sesam_fetch_array ($result)) &amp;&amp; count ($row) &gt; 0) {
-      print &quot; &lt;TR&gt;\n&quot;;
-      print &quot; &lt;TD&gt;&quot;.htmlspecialchars 
($row[&quot;firstname&quot;]).&quot;&lt;/TD&gt;\n&quot;;
-      print &quot; &lt;TD&gt;&quot;.htmlspecialchars 
($row[&quot;lastname&quot;]).&quot;&lt;/TD&gt;\n&quot;;
-      print &quot; &lt;TD&gt;&quot;.htmlspecialchars 
($row[&quot;phoneno&quot;]).&quot;&lt;/TD&gt;\n&quot;;
-      print &quot; &lt;/TR&gt;\n&quot;;
-      }
-      print &quot;&lt;/TABLE&gt;\n&quot;;
-      sesam_free_result ($result);
-      ?&gt;
+&lt;?php
+$result = sesam_query (&quot;SELECT * FROM phone\n&quot;.
+                       &quot;  WHERE 
+LASTNAME='&quot;.strtoupper($name).&quot;'\n&quot;.
+                       &quot;  ORDER BY FIRSTNAME&quot;, 1);
+if (!$result) {
+    ... error ...
+}
+// print the table:
+print &quot;&lt;TABLE BORDER&gt;\n&quot;;
+while (($row = sesam_fetch_array ($result)) &amp;&amp; count ($row) &gt; 0) {
+    print &quot; &lt;TR&gt;\n&quot;;
+    print &quot; &lt;TD&gt;&quot;.htmlspecialchars 
+($row[&quot;firstname&quot;]).&quot;&lt;/TD&gt;\n&quot;;
+    print &quot; &lt;TD&gt;&quot;.htmlspecialchars 
+($row[&quot;lastname&quot;]).&quot;&lt;/TD&gt;\n&quot;;
+    print &quot; &lt;TD&gt;&quot;.htmlspecialchars 
+($row[&quot;phoneno&quot;]).&quot;&lt;/TD&gt;\n&quot;;
+    print &quot; &lt;/TR&gt;\n&quot;;
+}
+print &quot;&lt;/TABLE&gt;\n&quot;;
+sesam_free_result ($result);
+?&gt;
      </programlisting>
     </example>
     <para>
@@ -1910,59 +1910,59 @@
       <tgroup cols="3">
        <thead>
         <row>
-         <entry>Value</entry>
-         <entry>Constant</entry>
-         <entry>Meaning</entry>
+        <entry>Value</entry>
+        <entry>Constant</entry>
+        <entry>Meaning</entry>
         </row>
        </thead>
        <tbody>
         <row>
-         <entry>0</entry>
-         <entry><literal>SESAM_SEEK_NEXT</literal></entry>
-         <entry>read sequentially
-         </entry>
-        </row>
-        <row>
-         <entry>1</entry>
-         <entry><literal>SESAM_SEEK_PRIOR</literal></entry>
-         <entry>read sequentially backwards
-         </entry>
-        </row>
-        <row>
-         <entry>2</entry>
-         <entry><literal>SESAM_SEEK_FIRST</literal></entry>
-         <entry>
-          fetch first row (after fetch, the default is set to
-          <literal>SESAM_SEEK_NEXT</literal>)
-         </entry>
-        </row>
-        <row>
-         <entry>3</entry>
-         <entry><literal>SESAM_SEEK_LAST</literal></entry>
-         <entry>
-          fetch last row (after fetch, the default is set to
-          <literal>SESAM_SEEK_PRIOR</literal>)
-         </entry>
-        </row>
-        <row>
-         <entry>4</entry>
-         <entry><literal>SESAM_SEEK_ABSOLUTE</literal></entry>
-         <entry>
-          fetch absolute row number given as
-          <parameter>offset</parameter> (Zero-based. After fetch, the
-          default is set to <literal>SESAM_SEEK_ABSOLUTE</literal>,
-          and the offset value is auto-incremented)
-         </entry>
-        </row>
-        <row>
-         <entry>5</entry>
-         <entry><literal>SESAM_SEEK_RELATIVE</literal></entry>
-         <entry>
-          fetch relative to current scroll position, where
-          <parameter>offset</parameter> can be a positive or negative
-          offset value (this also sets the default "offset" value for
-          subsequent fetches).
-         </entry>
+        <entry>0</entry>
+        <entry><literal>SESAM_SEEK_NEXT</literal></entry>
+        <entry>read sequentially
+        </entry>
+        </row>
+        <row>
+        <entry>1</entry>
+        <entry><literal>SESAM_SEEK_PRIOR</literal></entry>
+        <entry>read sequentially backwards
+        </entry>
+        </row>
+        <row>
+        <entry>2</entry>
+        <entry><literal>SESAM_SEEK_FIRST</literal></entry>
+        <entry>
+         fetch first row (after fetch, the default is set to
+         <literal>SESAM_SEEK_NEXT</literal>)
+        </entry>
+        </row>
+        <row>
+        <entry>3</entry>
+        <entry><literal>SESAM_SEEK_LAST</literal></entry>
+        <entry>
+         fetch last row (after fetch, the default is set to
+         <literal>SESAM_SEEK_PRIOR</literal>)
+        </entry>
+        </row>
+        <row>
+        <entry>4</entry>
+        <entry><literal>SESAM_SEEK_ABSOLUTE</literal></entry>
+        <entry>
+         fetch absolute row number given as
+         <parameter>offset</parameter> (Zero-based. After fetch, the
+         default is set to <literal>SESAM_SEEK_ABSOLUTE</literal>,
+         and the offset value is auto-incremented)
+        </entry>
+        </row>
+        <row>
+        <entry>5</entry>
+        <entry><literal>SESAM_SEEK_RELATIVE</literal></entry>
+        <entry>
+         fetch relative to current scroll position, where
+         <parameter>offset</parameter> can be a positive or negative
+         offset value (this also sets the default "offset" value for
+         subsequent fetches).
+        </entry>
         </row>
        </tbody>
       </tgroup>
@@ -1994,7 +1994,7 @@
     <para>
      Releases resources for the query associated with
      <parameter>result_id</parameter>.  Returns
-      &false; on error.
+     &false; on error.
     </para>
    </refsect1>
   </refentry>


Reply via email to