Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > by-pkgid > 05cd670d8a02b2b4a0ffb1756f2e8308 > files > 10980

php-manual-zh-5.2.4-1mdv2008.1.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>SQLite Functions</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REL="HOME"
TITLE="PHP 手册"
HREF="index.html"><LINK
REL="UP"
TITLE="函数参考"
HREF="funcref.html"><LINK
REL="PREVIOUS"
TITLE="spl_object_hash"
HREF="function.spl-object-hash.html"><LINK
REL="NEXT"
TITLE="sqlite_array_query"
HREF="function.sqlite-array-query.html"><META
HTTP-EQUIV="Content-type"
CONTENT="text/html; charset=UTF-8"></HEAD
><BODY
CLASS="reference"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>PHP 手册</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="function.spl-object-hash.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="function.sqlite-array-query.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="reference"
><A
NAME="ref.sqlite"
></A
><DIV
CLASS="TITLEPAGE"
><H1
CLASS="title"
>CLVI. SQLite Functions</H1
><DIV
CLASS="PARTINTRO"
><A
NAME="AEN215301"
></A
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="sqlite.intro"
>简介</A
></H1
><P
>&#13;     This is an extension for the SQLite Embeddable SQL Database Engine.   
     SQLite is a C library that implements an embeddable SQL database engine.
     Programs that link with the SQLite library can have SQL database access
     without running a separate RDBMS process.
    </P
><P
>&#13;     SQLite is not a client library used to connect to a big database server.
     SQLite is the server. The SQLite library reads and writes directly to and from
     the database files on disk.
    </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>注意: </B
>
      For further information see the SQLite Website 
      (<A
HREF="http://sqlite.org/"
TARGET="_top"
>http://sqlite.org/</A
>).
     </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="sqlite.install"
>Installation</A
></H1
><P
>&#13;     Read the INSTALL file, which comes with the package. Or just use the PEAR 
     installer with <B
CLASS="command"
>pear install sqlite</B
>.
     SQLite itself is already included, You do not need to install
     any additional software.
    </P
><P
>&#13;     Windows users may download the DLL version of the SQLite extension here:
     (<A
HREF="http://snaps.php.net/win32/PECL_STABLE/php_sqlite.dll"
TARGET="_top"
>php_sqlite.dll</A
>).
    </P
><P
>&#13;     In PHP 5, the SQLite extension and the engine itself are bundled and
     compiled by default. However, since PHP 5.1.0 you need to manually
     activate the extension in <TT
CLASS="filename"
>php.ini</TT
> (because it is now bundled as
     shared). Moreover, since PHP 5.1.0 SQLite depends on <A
HREF="ref.pdo.html"
>PDO</A
> it must be enabled too, by adding the
     following lines to <TT
CLASS="filename"
>php.ini</TT
> (in order):
     <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN215319"
></A
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="ini"
>extension=php_pdo.dll
extension=php_sqlite.dll</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
>
     On Linux or Unix operating systems, if you build PDO as a shared
     extension, you must build SQLite as a shared extension using the
     <B
CLASS="command"
>--with-sqlite=shared</B
> configure option.
    </P
><P
>&#13;     SQLite 3 is supported through <A
HREF="ref.pdo-sqlite.html"
>PDO SQLite</A
>.
    </P
><DIV
CLASS="note"
><BLOCKQUOTE
CLASS="note"
><P
><B
>Windows installation for unprivileged accounts: </B
>
      On Windows operating systems, unprivileged accounts don't have the
      <CODE
CLASS="varname"
>TMP</CODE
> environment variable set by default. This will
      make sqlite create temporary files in the windows directory, which is
      not desirable. So, you should set the <CODE
CLASS="varname"
>TMP</CODE
> environment
      variable for the web server or the user account the web server is
      running under. If Apache is your web server, you can accomplish this via
      a <B
CLASS="command"
>SetEnv</B
> directive in your <TT
CLASS="filename"
>httpd.conf</TT
> file. For
      example:
      <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN215331"
></A
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><PRE
CLASS="apache-conf"
>SetEnv TMP c:/temp</PRE
></TD
></TR
></TABLE
><P
></P
></DIV
>
      If you are unable to establish this setting at the server
      level, you can implement the setting in your script:
      <DIV
CLASS="informalexample"
><P
></P
><A
NAME="AEN215333"
></A
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
CELLPADDING="5"
><TR
><TD
><code><font color="#000000">
putenv('TMP=C:/temp');</font>
</code></TD
></TR
></TABLE
><P
></P
></DIV
>
      The setting must refer to a directory that the web server
      has permission to create files in and subsequently write
      to and delete the files it created.
      Otherwise, you may receive the following error message:
      <SAMP
CLASS="computeroutput"
>&#13;       malformed database schema -
       unable to open a temporary database file for storing temporary tables
      </SAMP
>
     </P
></BLOCKQUOTE
></DIV
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="sqlite.requirements"
>需求</A
></H1
><P
>&#13;     In order to have these functions available, you must compile PHP with
     SQLite support, or load the SQLite extension dynamically from your
     <TT
CLASS="filename"
>php.ini</TT
>.
    </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="sqlite.resources"
>资源类型</A
></H1
><P
>&#13;     There are two resources used in the SQLite Interface. The first one is the
     database connection, the second one the result set. 
    </P
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="sqlite.constants"
>预定义常量</A
></H1
><P
>以下常量由本扩展模块定义,因此只有在本扩展模块被编译到
PHP 中,或者在运行时被动态加载后才有效。</P
><P
>&#13;  The functions <A
HREF="function.sqlite-fetch-array.html"
><B
CLASS="function"
>sqlite_fetch_array()</B
></A
> and
  <A
HREF="function.sqlite-current.html"
><B
CLASS="function"
>sqlite_current()</B
></A
> use a constant for
  the different types of result arrays. The following constants are
  defined:
 </P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>SQLite result type constants</B
></P
><DL
><DT
><TT
CLASS="constant"
><B
>SQLITE_ASSOC</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Columns are returned into the array having the field name as the array
     index.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_BOTH</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Columns are returned into the array having both a numerical index
     and the field name as the array index.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_NUM</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Columns are returned into the array having a numerical index to the
     fields. This index starts with 0, the first field in the result.
    </P
></DD
></DL
></DIV
><P
>&#13;  A number of functions may return status codes.  The following constants are
  defined:
 </P
><P
></P
><DIV
CLASS="variablelist"
><P
><B
>SQLite status code constants</B
></P
><DL
><DT
><TT
CLASS="constant"
><B
>SQLITE_OK</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Successful result.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_ERROR</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     SQL error or missing database.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_INTERNAL</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     An internal logic error in SQLite.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_PERM</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Access permission denied.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_ABORT</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Callback routine requested an abort.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_BUSY</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     The database file is locked.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_LOCKED</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     A table in the database is locked.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_NOMEM</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Memory allocation failed.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_READONLY</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Attempt to write a readonly database.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_INTERRUPT</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Operation terminated internally.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_IOERR</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Disk I/O error occurred.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_CORRUPT</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     The database disk image is malformed.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_NOTFOUND</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     (Internal) Table or record not found.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_FULL</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Insertion failed because database is full.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_CANTOPEN</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Unable to open the database file.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_PROTOCOL</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Database lock protocol error.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_EMPTY</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     (Internal) Database table is empty.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_SCHEMA</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     The database schema changed.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_TOOBIG</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Too much data for one row of a table.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_CONSTRAINT</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Abort due to constraint violation.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_MISMATCH</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Data type mismatch.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_MISUSE</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Library used incorrectly.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_NOLFS</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Uses of OS features not supported on host.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_AUTH</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Authorized failed.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_ROW</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Internal process has another row ready.
    </P
></DD
><DT
><TT
CLASS="constant"
><B
>SQLITE_DONE</B
></TT
> 
    (<A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
>)</DT
><DD
><P
>&#13;     Internal process has finished executing.
    </P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="sqlite.classes"
>预定义类</A
></H1
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="sqlite.class.sqlitedatabase"
><B
CLASS="classname"
>SQLiteDatabase</B
></A
></H2
><P
>&#13;      Represents an opened SQLite database.
     </P
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="sqlite.class.sqlitedatabase.constructor"
>构造函数</A
></H3
><P
></P
><UL
><LI
><P
><A
HREF="function.sqlite-open.html"
>__construct</A
> - construct a new SQLiteDatabase object</P
></LI
></UL
></DIV
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="sqlite.class.sqlitedatabase.methods"
>方法</A
></H3
><P
></P
><UL
><LI
><P
><A
HREF="function.sqlite-query.html"
>query</A
> - Execute a query</P
></LI
><LI
><P
><A
HREF="function.sqlite-exec.html"
>queryExec</A
> - Execute a result-less query</P
></LI
><LI
><P
><A
HREF="function.sqlite-array-query.html"
>arrayQuery</A
> - Execute a query and return the result as an array</P
></LI
><LI
><P
><A
HREF="function.sqlite-single-query.html"
>singleQuery</A
> - Execute a query and return either an array for one single column or the value of the first row</P
></LI
><LI
><P
><A
HREF="function.sqlite-unbuffered-query.html"
>unbufferedQuery</A
> - Execute an unbuffered query</P
></LI
><LI
><P
><A
HREF="function.sqlite-last-insert-rowid.html"
>lastInsertRowid</A
> - Returns the rowid of the most recently inserted row</P
></LI
><LI
><P
><A
HREF="function.sqlite-changes.html"
>changes</A
> - Returns the number of rows changed by the most recent statement</P
></LI
><LI
><P
><A
HREF="function.sqlite-create-aggregate.html"
>createAggregate</A
> - Register an aggregating UDF for use in SQL statements</P
></LI
><LI
><P
><A
HREF="function.sqlite-create-function.html"
>createFunction</A
> - Register a UDF for use in SQL statements</P
></LI
><LI
><P
><A
HREF="function.sqlite-busy-timeout.html"
>busyTimeout</A
> - Sets or disables busy timeout duration</P
></LI
><LI
><P
><A
HREF="function.sqlite-last-error.html"
>lastError</A
> - Returns the last error code of the most recently encountered error</P
></LI
><LI
><P
><A
HREF="function.sqlite-fetch-column-types.html"
>fetchColumnTypes</A
> - Return an array of column types from a particular table</P
></LI
></UL
></DIV
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="sqlite.class.sqliteresult"
><B
CLASS="classname"
>SQLiteResult</B
></A
></H2
><P
>&#13;      Represents a buffered SQLite result set.
     </P
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="sqlite.class.sqliteresult.methods"
>方法</A
></H3
><P
></P
><UL
><LI
><P
><A
HREF="function.sqlite-fetch-array.html"
>fetch</A
> - Fetches the next row from the result set as an array</P
></LI
><LI
><P
><A
HREF="function.sqlite-fetch-object.html"
>fetchObject</A
> - Fetches the next row from the result set as an object</P
></LI
><LI
><P
><A
HREF="function.sqlite-fetch-single.html"
>fetchSingle</A
> - Fetches the first column from the result set as a string</P
></LI
><LI
><P
><A
HREF="function.sqlite-fetch-all.html"
>fetchAll</A
> - Fetches all rows from the result set as an array of arrays</P
></LI
><LI
><P
><A
HREF="function.sqlite-column.html"
>column</A
> - Fetches a column from the current row of the result set</P
></LI
><LI
><P
><A
HREF="function.sqlite-num-fields.html"
>numFields</A
> - Returns the number of fields in the result set</P
></LI
><LI
><P
><A
HREF="function.sqlite-field-name.html"
>fieldName</A
> - Returns the name of a particular field in the result set</P
></LI
><LI
><P
><A
HREF="function.sqlite-current.html"
>current</A
> - Fetches the current row from the result set as an array</P
></LI
><LI
><P
><A
HREF="function.sqlite-key.html"
>key</A
> - Return the current row index</P
></LI
><LI
><P
><A
HREF="function.sqlite-next.html"
>next</A
> - Seek to the next row number</P
></LI
><LI
><P
><A
HREF="function.sqlite-valid.html"
>valid</A
> - Returns whether more rows are available</P
></LI
><LI
><P
><A
HREF="function.sqlite-rewind.html"
>rewind</A
> - Seek to the first row number of the result set</P
></LI
><LI
><P
><A
HREF="function.sqlite-prev.html"
>prev</A
> - Seek to the previous row number of the result set</P
></LI
><LI
><P
><A
HREF="function.sqlite-has-prev.html"
>hasPrev</A
> - Returns whether or not a previous row is available</P
></LI
><LI
><P
><A
HREF="function.sqlite-num-rows.html"
>numRows</A
> - Returns the number of rows in the result set</P
></LI
><LI
><P
><A
HREF="function.sqlite-seek.html"
>seek</A
> - Seek to a particular row number</P
></LI
></UL
></DIV
></DIV
><DIV
CLASS="section"
><H2
CLASS="section"
><A
NAME="sqlite.class.sqliteunbuffered"
><B
CLASS="classname"
>SQLiteUnbuffered</B
></A
></H2
><P
>&#13;      Represents an unbuffered SQLite result set.  Unbuffered results sets are sequential, forward-seeking only.
     </P
><DIV
CLASS="section"
><H3
CLASS="section"
><A
NAME="sqlite.class.sqliteunbuffered.methods"
>方法</A
></H3
><P
></P
><UL
><LI
><P
><A
HREF="function.sqlite-fetch-array.html"
>fetch</A
> - Fetches the next row from the result set as an array</P
></LI
><LI
><P
><A
HREF="function.sqlite-fetch-object.html"
>fetchObject</A
> - Fetches the next row from the result set as an object</P
></LI
><LI
><P
><A
HREF="function.sqlite-fetch-single.html"
>fetchSingle</A
> - Fetches the first column from the result set as a string</P
></LI
><LI
><P
><A
HREF="function.sqlite-fetch-all.html"
>fetchAll</A
> - Fetches all rows from the result set as an array of arrays</P
></LI
><LI
><P
><A
HREF="function.sqlite-column.html"
>column</A
> - Fetches a column from the current row of the result set</P
></LI
><LI
><P
><A
HREF="function.sqlite-num-fields.html"
>numFields</A
> - Returns the number of fields in the result set</P
></LI
><LI
><P
><A
HREF="function.sqlite-field-name.html"
>fieldName</A
> - Returns the name of a particular field in the result set</P
></LI
><LI
><P
><A
HREF="function.sqlite-current.html"
>current</A
> - Fetches the current row from the result set as an array</P
></LI
><LI
><P
><A
HREF="function.sqlite-next.html"
>next</A
> - Seek to the next row number</P
></LI
><LI
><P
><A
HREF="function.sqlite-valid.html"
>valid</A
> - Returns whether more rows are available</P
></LI
></UL
></DIV
></DIV
></DIV
><DIV
CLASS="section"
><H1
CLASS="section"
><A
NAME="sqlite.configuration"
>运行时配置</A
></H1
><P
>这些函数的行为受 <TT
CLASS="filename"
>php.ini</TT
> 的影响。</P
><P
>&#13;  <DIV
CLASS="table"
><A
NAME="AEN215676"
></A
><P
><B
>表 1. SQLite 配置选项</B
></P
><TABLE
BORDER="1"
CLASS="CALSTABLE"
><COL><COL><COL><COL><THEAD
><TR
><TH
>名字</TH
><TH
>默认</TH
><TH
>可修改范围</TH
><TH
>Changelog</TH
></TR
></THEAD
><TBODY
><TR
><TD
>sqlite.assoc_case</TD
><TD
>"0"</TD
><TD
>PHP_INI_ALL</TD
><TD
>Available since PHP 5.0.0.</TD
></TR
></TBODY
></TABLE
></DIV
>
  有关 PHP_INI_* 常量进一步的细节与定义参见<A
HREF="ini.html"
>附录 H</A
>。
 </P
><P
>以下是配置选项的简要解释。</P
><P
>&#13;  <P
></P
><DIV
CLASS="variablelist"
><DL
><DT
><A
NAME="ini.sqlite.assoc-case"
></A
><CODE
CLASS="parameter"
>sqlite.assoc_case</CODE
>
     <A
HREF="language.types.integer.html"
><B
CLASS="type"
>int</B
></A
></DT
><DD
><P
>&#13;      Whether to use mixed case (<TT
CLASS="literal"
>0</TT
>), upper case
      (<TT
CLASS="literal"
>1</TT
>) or lower case (<TT
CLASS="literal"
>2</TT
>) hash
      indexes. 
     </P
><P
>&#13;      This option is primarily useful when you need compatibility with other
      database systems, where the names of the columns are always returned as
      uppercase or lowercase, regardless of the case of the actual field names
      in the database schema.
     </P
><P
>&#13;      The SQLite library returns the column names in their natural case (that
      matches the case you used in your schema).  When
      <CODE
CLASS="parameter"
>sqlite.assoc_case</CODE
> is set to <TT
CLASS="literal"
>0</TT
>
      the natural case will be preserved.  When it is set to
      <TT
CLASS="literal"
>1</TT
> or <TT
CLASS="literal"
>2</TT
>, PHP will apply case
      folding on the hash keys to upper- or lower-case the keys, respectively.
     </P
><P
>&#13;      Use of this option incurs a slight performance penalty, but is MUCH
      faster than performing the case folding yourself using PHP script.
     </P
></DD
></DL
></DIV
>
 </P
></DIV
></DIV
><DIV
CLASS="TOC"
><DL
><DT
><B
>目录</B
></DT
><DT
><A
HREF="function.sqlite-array-query.html"
>sqlite_array_query</A
>&nbsp;--&nbsp;Execute a query against a given database and returns an array</DT
><DT
><A
HREF="function.sqlite-busy-timeout.html"
>sqlite_busy_timeout</A
>&nbsp;--&nbsp;Set busy timeout duration, or disable busy handlers</DT
><DT
><A
HREF="function.sqlite-changes.html"
>sqlite_changes</A
>&nbsp;--&nbsp;
   Returns the number of rows that were changed by the most
   recent SQL statement
  </DT
><DT
><A
HREF="function.sqlite-close.html"
>sqlite_close</A
>&nbsp;--&nbsp;Closes an open SQLite database</DT
><DT
><A
HREF="function.sqlite-column.html"
>sqlite_column</A
>&nbsp;--&nbsp;Fetches a column from the current row of a result set</DT
><DT
><A
HREF="function.sqlite-create-aggregate.html"
>sqlite_create_aggregate</A
>&nbsp;--&nbsp;Register an aggregating UDF for use in SQL statements</DT
><DT
><A
HREF="function.sqlite-create-function.html"
>sqlite_create_function</A
>&nbsp;--&nbsp;
   Registers a "regular" User Defined Function for use in SQL statements
  </DT
><DT
><A
HREF="function.sqlite-current.html"
>sqlite_current</A
>&nbsp;--&nbsp;Fetches the current row from a result set as an array</DT
><DT
><A
HREF="function.sqlite-error-string.html"
>sqlite_error_string</A
>&nbsp;--&nbsp;Returns the textual description of an error code</DT
><DT
><A
HREF="function.sqlite-escape-string.html"
>sqlite_escape_string</A
>&nbsp;--&nbsp;Escapes a string for use as a query parameter</DT
><DT
><A
HREF="function.sqlite-exec.html"
>sqlite_exec</A
>&nbsp;--&nbsp;Executes a result-less query against a given database</DT
><DT
><A
HREF="function.sqlite-factory.html"
>sqlite_factory</A
>&nbsp;--&nbsp;Opens a SQLite database and returns a SQLiteDatabase object</DT
><DT
><A
HREF="function.sqlite-fetch-all.html"
>sqlite_fetch_all</A
>&nbsp;--&nbsp;Fetches all rows from a result set as an array of arrays</DT
><DT
><A
HREF="function.sqlite-fetch-array.html"
>sqlite_fetch_array</A
>&nbsp;--&nbsp;Fetches the next row from a result set as an array</DT
><DT
><A
HREF="function.sqlite-fetch-column-types.html"
>sqlite_fetch_column_types</A
>&nbsp;--&nbsp;
   Return an array of column types from a particular table
  </DT
><DT
><A
HREF="function.sqlite-fetch-object.html"
>sqlite_fetch_object</A
>&nbsp;--&nbsp;Fetches the next row from a result set as an object</DT
><DT
><A
HREF="function.sqlite-fetch-single.html"
>sqlite_fetch_single</A
>&nbsp;--&nbsp;Fetches the first column of a result set as a string</DT
><DT
><A
HREF="function.sqlite-fetch-string.html"
>sqlite_fetch_string</A
>&nbsp;--&nbsp;别名 <A
HREF="function.sqlite-fetch-single.html"
><B
CLASS="function"
>sqlite_fetch_single()</B
></A
></DT
><DT
><A
HREF="function.sqlite-field-name.html"
>sqlite_field_name</A
>&nbsp;--&nbsp;Returns the name of a particular field</DT
><DT
><A
HREF="function.sqlite-has-more.html"
>sqlite_has_more</A
>&nbsp;--&nbsp;Finds whether or not more rows are available</DT
><DT
><A
HREF="function.sqlite-has-prev.html"
>sqlite_has_prev</A
>&nbsp;--&nbsp;Returns whether or not a previous row is available</DT
><DT
><A
HREF="function.sqlite-key.html"
>sqlite_key</A
>&nbsp;--&nbsp;Returns the current row index</DT
><DT
><A
HREF="function.sqlite-last-error.html"
>sqlite_last_error</A
>&nbsp;--&nbsp;Returns the error code of the last error for a database</DT
><DT
><A
HREF="function.sqlite-last-insert-rowid.html"
>sqlite_last_insert_rowid</A
>&nbsp;--&nbsp;Returns the rowid of the most recently inserted row</DT
><DT
><A
HREF="function.sqlite-libencoding.html"
>sqlite_libencoding</A
>&nbsp;--&nbsp;Returns the encoding of the linked SQLite library</DT
><DT
><A
HREF="function.sqlite-libversion.html"
>sqlite_libversion</A
>&nbsp;--&nbsp;Returns the version of the linked SQLite library</DT
><DT
><A
HREF="function.sqlite-next.html"
>sqlite_next</A
>&nbsp;--&nbsp;Seek to the next row number</DT
><DT
><A
HREF="function.sqlite-num-fields.html"
>sqlite_num_fields</A
>&nbsp;--&nbsp;Returns the number of fields in a result set</DT
><DT
><A
HREF="function.sqlite-num-rows.html"
>sqlite_num_rows</A
>&nbsp;--&nbsp;Returns the number of rows in a buffered result set</DT
><DT
><A
HREF="function.sqlite-open.html"
>sqlite_open</A
>&nbsp;--&nbsp;Opens a SQLite database and create the database if it does not exist</DT
><DT
><A
HREF="function.sqlite-popen.html"
>sqlite_popen</A
>&nbsp;--&nbsp;
   Opens a persistent handle to an SQLite database and create the database if it does not exist
  </DT
><DT
><A
HREF="function.sqlite-prev.html"
>sqlite_prev</A
>&nbsp;--&nbsp;Seek to the previous row number of a result set</DT
><DT
><A
HREF="function.sqlite-query.html"
>sqlite_query</A
>&nbsp;--&nbsp;Executes a query against a given database and returns a result handle</DT
><DT
><A
HREF="function.sqlite-rewind.html"
>sqlite_rewind</A
>&nbsp;--&nbsp;Seek to the first row number</DT
><DT
><A
HREF="function.sqlite-seek.html"
>sqlite_seek</A
>&nbsp;--&nbsp;Seek to a particular row number of a buffered result set</DT
><DT
><A
HREF="function.sqlite-single-query.html"
>sqlite_single_query</A
>&nbsp;--&nbsp;
   Executes a query and returns either an array for one single column or the value of the first row
  </DT
><DT
><A
HREF="function.sqlite-udf-decode-binary.html"
>sqlite_udf_decode_binary</A
>&nbsp;--&nbsp;Decode binary data passed as parameters to an UDF</DT
><DT
><A
HREF="function.sqlite-udf-encode-binary.html"
>sqlite_udf_encode_binary</A
>&nbsp;--&nbsp;Encode binary data before returning it from an UDF</DT
><DT
><A
HREF="function.sqlite-unbuffered-query.html"
>sqlite_unbuffered_query</A
>&nbsp;--&nbsp;Execute a query that does not prefetch and buffer all data</DT
><DT
><A
HREF="function.sqlite-valid.html"
>sqlite_valid</A
>&nbsp;--&nbsp;Returns whether more rows are available</DT
></DL
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="function.spl-object-hash.html"
ACCESSKEY="P"
>上一页</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>起始页</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="function.sqlite-array-query.html"
ACCESSKEY="N"
>下一页</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>spl_object_hash</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="funcref.html"
ACCESSKEY="U"
>上一级</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>sqlite_array_query</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>