<?xml version='1.0' encoding="utf-8"?>
<!-- $Revision$ -->
<appendix xml:id="sqlite.constants" xmlns="http://docbook.org/ns/docbook">
 &reftitle.constants;
 &extension.constants;
 <para>
  The functions <function>sqlite_fetch_array</function> and
  <function>sqlite_current</function> use a constant for
  the different types of result arrays. The following constants are
  defined:
 </para>
 <variablelist>
  <title>SQLite result type constants</title>
  <varlistentry>
   <term>
    <constant>SQLITE_ASSOC</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Columns are returned into the array having the field name as the array
     index.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_BOTH</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Columns are returned into the array having both a numerical index
     and the field name as the array index.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_NUM</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Columns are returned into the array having a numerical index to the
     fields. This index starts with 0, the first field in the result.
    </simpara>
   </listitem>
  </varlistentry>
 </variablelist>
 <para>
  A number of functions may return status codes.  The following constants are
  defined:
 </para>
 <variablelist>
  <title>SQLite status code constants</title>
  <varlistentry>
   <term>
    <constant>SQLITE_OK</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Successful result.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_ERROR</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     SQL error or missing database.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_INTERNAL</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     An internal logic error in SQLite.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_PERM</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Access permission denied.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_ABORT</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Callback routine requested an abort.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_BUSY</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     The database file is locked.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_LOCKED</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     A table in the database is locked.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_NOMEM</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Memory allocation failed.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_READONLY</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Attempt to write a readonly database.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_INTERRUPT</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Operation terminated internally.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_IOERR</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Disk I/O error occurred.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_NOTADB</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     File opened that is not a database file.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_CORRUPT</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     The database disk image is malformed.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_FORMAT</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Auxiliary database format error.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_NOTFOUND</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     (Internal) Table or record not found.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_FULL</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Insertion failed because database is full.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_CANTOPEN</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Unable to open the database file.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_PROTOCOL</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Database lock protocol error.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_EMPTY</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     (Internal) Database table is empty.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_SCHEMA</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     The database schema changed.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_TOOBIG</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Too much data for one row of a table.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_CONSTRAINT</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Abort due to constraint violation.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_MISMATCH</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Data type mismatch.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_MISUSE</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Library used incorrectly.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_NOLFS</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Uses of OS features not supported on host.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_AUTH</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Authorized failed.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_ROW</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Internal process has another row ready.
    </simpara>
   </listitem>
  </varlistentry>
  <varlistentry>
   <term>
    <constant>SQLITE_DONE</constant> 
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Internal process has finished executing.
    </simpara>
   </listitem>
  </varlistentry>
 </variablelist>
</appendix>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->