mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
change to new structure, add status code constants
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@180070 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
1d91769207
commit
3ab54a757c
1 changed files with 333 additions and 36 deletions
|
@ -1,49 +1,346 @@
|
|||
<?xml version='1.0' encoding='iso-8859-1'?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<section id="sqlite.constants">
|
||||
<title>Predefined Constants</title>
|
||||
&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>
|
||||
<table>
|
||||
<title>SQLite fetch constants</title>
|
||||
<tgroup cols="2">
|
||||
<thead>
|
||||
<row>
|
||||
<entry>constant</entry>
|
||||
<entry>meaning</entry>
|
||||
</row>
|
||||
</thead>
|
||||
<tbody>
|
||||
<row>
|
||||
<entry>SQLITE_ASSOC</entry>
|
||||
<entry>
|
||||
Columns are returned into the array having the fieldname as the array
|
||||
index.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SQLITE_BOTH</entry>
|
||||
<entry>
|
||||
Columns are returned into the array having both a numerical index
|
||||
and the fieldname as the array index.
|
||||
</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry>SQLITE_NUM</entry>
|
||||
<entry>
|
||||
Columns are returned into the array having a numerical index to the
|
||||
fields. This index starts with 0, the first field in the result.
|
||||
</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
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_CORRUPT</constant>
|
||||
(<type>int</type>)
|
||||
</term>
|
||||
<listitem>
|
||||
<simpara>
|
||||
The database disk image is malformed.
|
||||
</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>
|
||||
</section>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
|
|
Loading…
Reference in a new issue