2003-06-20 17:31:55 +00:00
<?xml version="1.0" encoding="iso-8859-1"?>
2005-01-14 05:29:07 +00:00
<!-- $Revision: 1.13 $ -->
2003-06-20 17:31:55 +00:00
<reference id= "ref.sqlite" >
2005-01-14 05:29:07 +00:00
<title > SQLite Functions</title>
2003-06-20 17:31:55 +00:00
<titleabbrev > SQLite</titleabbrev>
2003-06-20 18:26:30 +00:00
2003-06-20 17:31:55 +00:00
<partintro >
2003-06-20 18:26:30 +00:00
<section id= "sqlite.intro" >
2003-06-20 19:08:05 +00:00
&reftitle.intro;
2003-06-20 18:26:30 +00:00
<para >
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.
</para>
<para >
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.
</para>
<note >
2003-06-20 17:31:55 +00:00
<para >
2003-06-20 18:26:30 +00:00
For further information see the SQLite Website
2003-06-20 19:31:15 +00:00
(<ulink url= "&url.sqlite;" > &url.sqlite; </ulink> ).
2003-06-20 17:31:55 +00:00
</para>
2003-06-20 18:26:30 +00:00
</note>
</section>
2003-06-20 17:31:55 +00:00
2003-06-20 18:26:30 +00:00
<section id= "sqlite.install" >
<title > Installation</title>
<para >
Read the INSTALL file, which comes with the package. Or just use the PEAR
installer with "pear install sqlite".
SQLite itself is already included, You do not need to install
any additional software.
</para>
<para >
2003-06-20 19:31:15 +00:00
Windows users may download the DLL version of the SQLite extension here:
2003-06-20 20:19:29 +00:00
(<ulink url= "&url.pecl.get.win;php_sqlite.dll" > php_sqlite.dll</ulink> ).
2003-06-20 18:26:30 +00:00
</para>
2004-03-12 15:26:05 +00:00
<para >
In PHP 5, the SQLite extension and the engine itself are bundled and
2004-08-13 01:00:48 +00:00
compiled by default.
2004-03-12 15:26:05 +00:00
</para>
2003-06-20 18:26:30 +00:00
</section>
<section id= "sqlite.requirements" >
&reftitle.required;
<para >
In order to have these functions available, you must compile PHP with
SQLite support, or load the SQLite extension dynamically from your
2003-07-16 15:05:51 +00:00
&php.ini; .
2003-06-20 18:26:30 +00:00
</para>
</section>
<section id= "sqlite.resources" >
&reftitle.resources;
<para >
There are two resources used in the SQLite Interface. The first one is the
database connection, the second one the result set.
</para>
</section>
2003-06-20 17:31:55 +00:00
2004-08-03 17:25:34 +00:00
&reference.sqlite.constants;
2005-01-12 08:56:59 +00:00
<section id= "sqlite.classes" >
&reftitle.classes;
<section id= "sqlite.class.sqlitedatabase" >
<title > <classname > SQLiteDatabase</classname> </title>
<para >
Represents an opened SQLite database.
</para>
<section id= 'sqlite.class.sqlitedatabase.constructor' >
&reftitle.constructor;
<itemizedlist >
<listitem >
<para > <link linkend= 'function.sqlite-open' > __construct</link> - construct a new SQLiteDatabase object</para>
</listitem>
</itemizedlist>
</section>
<section id= 'sqlite.class.sqlitedatabase.methods' >
&reftitle.methods;
<itemizedlist >
<listitem >
<para > <link linkend= 'function.sqlite-query' > query</link> - Execute a query</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-exec' > queryExec</link> - Execute a result-less query</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-array-query' > arrayQuery</link> - Execute a query and return the result as an array</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-single-query' > singleQuery</link> - Execute a query and return either an array for one single column or the value of the first row</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-unbuffered-query' > unbufferedQuery</link> - Execute an unbuffered query</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-last-insert-rowid' > lastInsertRowid</link> - Returns the rowid of the most recently inserted row</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-changes' > changes</link> - Returns the number of rows changed by the most recent statement</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-create-aggregate' > createAggregate</link> - Register an aggregating UDF for use in SQL statements</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-create-function' > createFunction</link> - Register a UDF for use in SQL statements</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-busy-timeout' > busyTimeout</link> - Sets or disables busy timeout duration</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-last-error' > lastErorr</link> - Returns the last error code of the most recently encountered error</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-fetch-column-types' > fetchColumnTypes</link> - Return an array of column types from a particular table</para>
</listitem>
</itemizedlist>
</section>
</section>
<section id= "sqlite.class.sqliteresult" >
<title > <classname > SQLiteResult</classname> </title>
<para >
Represents a buffered SQLite result set.
</para>
<section id= 'sqlite.class.sqliteresult.methods' >
&reftitle.methods;
<itemizedlist >
<listitem >
<para > <link linkend= 'function.sqlite-fetch-array' > fetch</link> - Fetches the next row from the result set as an array</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-fetch-object' > fetchObject</link> - Fetches the next row from the result set as an object</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-fetch-single' > fetchSingle</link> - Fetches the first column from the result set as a string</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-fetch-all' > fetchAll</link> - Fetches all rows from the result set as an array of arrays</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-column' > column</link> - Fetches a column from the current row of the result set</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-num-fields' > numFields</link> - Returns the number of fields in the result set</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-field-name' > fieldName</link> - Returns the name of a particular field in the result set</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-current' > current</link> - Fetches the current row from the result set as an array</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-key' > key</link> - Return the current row index</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-next' > next</link> - Seek to the next row number</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-valid' > valid</link> - Returns whether more rows are available</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-rewind' > rewind</link> - Seek to the first row number of the result set</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-prev' > prev</link> - Seek to the previous row number of the result set</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-has-prev' > hasPrev</link> - Returns whether or not a previous row is available</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-num-rows' > numRows</link> - Returns the number of rows in the result set</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-seek' > seek</link> - Seek to a particular row number</para>
</listitem>
</itemizedlist>
</section>
</section>
<section id= "sqlite.class.sqliteunbuffered" >
<title > <classname > SQLiteUnbuffered</classname> </title>
<para >
Represents an unbuffered SQLite result set. Unbuffered results sets are sequential, foward-seeking only.
</para>
<section id= 'sqlite.class.sqliteunbuffered.methods' >
&reftitle.methods;
<itemizedlist >
<listitem >
<para > <link linkend= 'function.sqlite-fetch-array' > fetch</link> - Fetches the next row from the result set as an array</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-fetch-object' > fetchObject</link> - Fetches the next row from the result set as an object</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-fetch-single' > fetchSingle</link> - Fetches the first column from the result set as a string</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-fetch-all' > fetchAll</link> - Fetches all rows from the result set as an array of arrays</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-column' > column</link> - Fetches a column from the current row of the result set</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-num-fields' > numFields</link> - Returns the number of fields in the result set</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-field-name' > fieldName</link> - Returns the name of a particular field in the result set</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-current' > current</link> - Fetches the current row from the result set as an array</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-next' > next</link> - Seek to the next row number</para>
</listitem>
<listitem >
<para > <link linkend= 'function.sqlite-valid' > valid</link> - Returns whether more rows are available</para>
</listitem>
</itemizedlist>
</section>
</section>
</section>
2004-08-03 17:25:34 +00:00
&reference.sqlite.ini;
2003-06-20 18:26:30 +00:00
</partintro>
2004-08-03 17:25:34 +00:00
2003-06-20 18:26:30 +00:00
&reference.sqlite.functions;
2003-06-20 17:31:55 +00:00
2003-06-20 18:26:30 +00:00
</reference>
2003-06-20 17:31:55 +00:00
<!-- 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:"../../../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
-->