philip Sun Jul 6 00:43:09 2003 EDT
Modified files:
/phpdoc/en/reference/sqlite/functions sqlite-array-query.xml
sqlite-busy-timeout.xml
sqlite-changes.xml
sqlite-column.xml
sqlite-create-aggregate.xml
sqlite-create-function.xml
sqlite-current.xml
sqlite-error-string.xml
sqlite-escape-string.xml
sqlite-fetch-array.xml
sqlite-fetch-string.xml
sqlite-field-name.xml
sqlite-has-more.xml
sqlite-last-error.xml
sqlite-last-insert-rowid.xml
sqlite-libencoding.xml
sqlite-libversion.xml
sqlite-next.xml
sqlite-num-fields.xml
sqlite-num-rows.xml
sqlite-open.xml
sqlite-popen.xml
sqlite-query.xml
sqlite-rewind.xml
sqlite-seek.xml
sqlite-udf-decode-binary.xml
sqlite-udf-encode-binary.xml
sqlite-unbuffered-query.xml
Log:
Implement prototype tweaks from here:
http://cvs.php.net/diff.php/php-src/ext/sqlite/sqlite.c?r1=1.69&r2=1.70
As well as other minor modifications.
Index: phpdoc/en/reference/sqlite/functions/sqlite-array-query.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-array-query.xml:1.4
phpdoc/en/reference/sqlite/functions/sqlite-array-query.xml:1.5
--- phpdoc/en/reference/sqlite/functions/sqlite-array-query.xml:1.4 Sun Jun 22
12:43:07 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-array-query.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="function.sqlite-array-query">
<refnamediv>
<refname>sqlite_array_query</refname>
- <refpurpose>Execute a query against a given database and returns an
array</refpurpose>
+ <refpurpose>Execute a query against a given database and returns an
array.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -25,13 +25,15 @@
<example>
<title><function>sqlite_array_query</function> implemented yourself</title>
<programlisting role="php">
-<![CDATA[<?php
+<![CDATA[
+<?php
$q = sqlite_query($database, "SELECT * from foo LIMIT 100");
$rows = array();
while ($r = sqlite_fetch_array($q)) {
- $rows[] = $r;
+ $rows[] = $r;
}
-?>]]>
+?>
+]]>
</programlisting>
</example>
<tip>
@@ -43,6 +45,11 @@
performance.
</para>
</tip>
+ <para>
+ See also <function>sqlite_query</function>,
+ <function>sqlite_fetch_array</function>, and
+ <function>sqlite_fetch_string</function>.
+ </para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Index: phpdoc/en/reference/sqlite/functions/sqlite-busy-timeout.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-busy-timeout.xml:1.2
phpdoc/en/reference/sqlite/functions/sqlite-busy-timeout.xml:1.3
--- phpdoc/en/reference/sqlite/functions/sqlite-busy-timeout.xml:1.2 Fri Jun 20
14:57:15 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-busy-timeout.xml Sun Jul 6
00:43:08 2003
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<refentry id="function.sqlite-busy-timeout">
<refnamediv><refname>sqlite_busy_timeout</refname>
- <refpurpose>Set busy timeout duration, or disable busy handlers</refpurpose>
+ <refpurpose>Set busy timeout duration, or disable busy handlers.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -23,7 +23,12 @@
<para>
PHP sets the default busy timeout to be 60 seconds when the database is
opened.
- </para>
+ </para>
+ <note>
+ <para>
+ There are one thousand (1000) milliseconds in one second.
+ </para>
+ </note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Index: phpdoc/en/reference/sqlite/functions/sqlite-changes.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-changes.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-changes.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-changes.xml:1.3 Fri Jun 20 14:57:15
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-changes.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.sqlite-changes">
<refnamediv>
<refname>sqlite_changes</refname>
- <refpurpose>Returns the number of rows that were changed by the most recent SQL
statement</refpurpose>
+ <refpurpose>
+ Returns the number of rows that were changed by the most
+ recent SQL statement.
+ </refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -14,6 +17,9 @@
<para>
Returns the numbers of rows that were changed by the most recent SQL
statement executed against the database <parameter>db</parameter>.
+ </para>
+ <para>
+ See also <function>sqlite_num_rows</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc/en/reference/sqlite/functions/sqlite-column.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-column.xml:1.2
phpdoc/en/reference/sqlite/functions/sqlite-column.xml:1.3
--- phpdoc/en/reference/sqlite/functions/sqlite-column.xml:1.2 Fri Jun 20 14:57:15
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-column.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<refentry id="function.sqlite-column">
<refnamediv>
<refname>sqlite_column</refname>
- <refpurpose>Fetches a column from the current row of a result set</refpurpose>
+ <refpurpose>Fetches a column from the current row of a result set.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -24,6 +24,9 @@
<para>
Use this function when you are iterating a large result set with many
columns, or with columns that contain large amounts of data.
+ </para>
+ <para>
+ See also <function>sqlite_fetch_string</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc/en/reference/sqlite/functions/sqlite-create-aggregate.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-create-aggregate.xml:1.1
phpdoc/en/reference/sqlite/functions/sqlite-create-aggregate.xml:1.2
--- phpdoc/en/reference/sqlite/functions/sqlite-create-aggregate.xml:1.1 Sat
Jun 21 09:24:58 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-create-aggregate.xml Sun Jul 6
00:43:08 2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<refentry id="function.sqlite-create-aggregate">
<refnamediv>
<refname>sqlite_create_aggregate</refname>
- <refpurpose>Register an aggregating UDF for use in SQL statements</refpurpose>
+ <refpurpose>Register an aggregating UDF for use in SQL statements.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -52,25 +52,26 @@
$db = sqlite_open(':memory:');
sqlite_query($db, "CREATE TABLE strings(a)");
foreach ($data as $str) {
- sqlite_query($db, "INSERT INTO strings VALUES('" .
- sqlite_escape_string($str) . "')");
+ $str = sqlite_escape_string($str);
+ sqlite_query($db, "INSERT INTO strings VALUES ('$str')");
}
function max_len_step(&$context, $string) {
- if (strlen($string) > $context) {
- $context = strlen($string);
- }
+ if (strlen($string) > $context) {
+ $context = strlen($string);
+ }
}
function max_len_finalize(&$context) {
- return $context;
+ return $context;
}
sqlite_create_aggregate($db, 'max_len', 'max_len_step', 'max_len_finalize');
var_dump(sqlite_array_query($db, 'SELECT max_len(a) from strings'));
-?>]]>
+?>
+]]>
</programlisting>
</example>
</para>
Index: phpdoc/en/reference/sqlite/functions/sqlite-create-function.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-create-function.xml:1.4
phpdoc/en/reference/sqlite/functions/sqlite-create-function.xml:1.5
--- phpdoc/en/reference/sqlite/functions/sqlite-create-function.xml:1.4 Sat Jun 21
09:24:58 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-create-function.xml Sun Jul 6
00:43:08 2003
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="function.sqlite-create-function">
<refnamediv>
<refname>sqlite_create_function</refname>
- <refpurpose>Registers a "regular" User Defined Function for use in SQL
statements</refpurpose>
+ <refpurpose>
+ Registers a "regular" User Defined Function for use in SQL statements.
+ </refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -35,7 +37,6 @@
The UDF can be used in any SQL statement that can call functions, such as
SELECT and UPDATE statements and also in triggers.
</para>
-
<para>
<example>
<title><function>sqlite_create_function</function> example</title>
@@ -49,7 +50,8 @@
sqlite_create_function($db, 'md5rev', 'md5_and_reverse', 1);
$rows = sqlite_array_query($db, 'SELECT md5rev(filename) from files');
-?>]]>
+?>
+]]>
</programlisting>
</example>
</para>
@@ -63,7 +65,6 @@
The beauty of this technique is that you do not need to process the
result using a foreach() loop after you have queried for the data.
</para>
-
<para>
PHP registers a special function named <literal>php</literal> when the
database is first opened. The php function can be used to call any PHP
@@ -76,7 +77,8 @@
<![CDATA[
<?php
$rows = sqlite_array_query($db, "SELECT php('md5', filename) from files");
-?>]]>
+?>
+]]>
</programlisting>
<para>
This example will call the <function>md5</function> on each
Index: phpdoc/en/reference/sqlite/functions/sqlite-current.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-current.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-current.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-current.xml:1.3 Fri Jun 20 14:57:15
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-current.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.sqlite-current">
<refnamediv>
<refname>sqlite_current</refname>
- <refpurpose>Fetches the current row from a result set as an array</refpurpose>
+ <refpurpose>Fetches the current row from a result set as an array.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -30,7 +30,8 @@
</note>
<para>
See also <function>sqlite_seek</function>,
- <function>sqlite_next</function>.
+ <function>sqlite_next</function>, and
+ <function>sqlite_fetch_array</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc/en/reference/sqlite/functions/sqlite-error-string.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-error-string.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-error-string.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-error-string.xml:1.3 Fri Jun 20
14:57:15 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-error-string.xml Sun Jul 6
00:43:08 2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.sqlite-error-string">
<refnamediv>
<refname>sqlite_error_string</refname>
- <refpurpose>Returns the textual description of an error code</refpurpose>
+ <refpurpose>Returns the textual description of an error code.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
Index: phpdoc/en/reference/sqlite/functions/sqlite-escape-string.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-escape-string.xml:1.4
phpdoc/en/reference/sqlite/functions/sqlite-escape-string.xml:1.5
--- phpdoc/en/reference/sqlite/functions/sqlite-escape-string.xml:1.4 Sat Jun 21
09:24:58 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-escape-string.xml Sun Jul 6
00:43:08 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="function.sqlite-escape-string">
<refnamediv>
<refname>sqlite_escape_string</refname>
@@ -47,6 +47,9 @@
<function>sqlite_udf_encode_binary</function> instead.
</simpara>
</note>
+ <para>
+ See also <function>sqlite_udf_encode_binary</function>.
+ </para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Index: phpdoc/en/reference/sqlite/functions/sqlite-fetch-array.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-fetch-array.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-fetch-array.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-fetch-array.xml:1.3 Fri Jun 20
14:57:15 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-fetch-array.xml Sun Jul 6 00:43:08
2003
@@ -18,7 +18,7 @@
associative array representing the row data.
</para>
<para>
- <parameter>result_type</parameter> can be used to specifiy how you want
+ <parameter>result_type</parameter> can be used to specify how you want
the results to be returned. The default value is
<literal>SQLITE_BOTH</literal> which returns columns indexed by their
ordinal column number and by column name.
Index: phpdoc/en/reference/sqlite/functions/sqlite-fetch-string.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-fetch-string.xml:1.2
phpdoc/en/reference/sqlite/functions/sqlite-fetch-string.xml:1.3
--- phpdoc/en/reference/sqlite/functions/sqlite-fetch-string.xml:1.2 Fri Jun 20
14:57:15 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-fetch-string.xml Sun Jul 6
00:43:08 2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<refentry id="function.sqlite-fetch-string">
<refnamediv>
<refname>sqlite_fetch_string</refname>
- <refpurpose>Fetches first column of a result set as a string.</refpurpose>
+ <refpurpose>Fetches the first column of a result set as a string.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -21,6 +21,9 @@
<para>
This is the most optimial way to retrieve data when you are only
interested in the values from a single column of data.
+ </para>
+ <para>
+ See also <function>sqlite_fetch_array</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc/en/reference/sqlite/functions/sqlite-field-name.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-field-name.xml:1.2
phpdoc/en/reference/sqlite/functions/sqlite-field-name.xml:1.3
--- phpdoc/en/reference/sqlite/functions/sqlite-field-name.xml:1.2 Fri Jun 20
14:49:38 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-field-name.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<refentry id="function.sqlite-field-name">
<refnamediv>
<refname>sqlite_field_name</refname>
- <refpurpose>Returns the name of a particular field</refpurpose>
+ <refpurpose>Returns the name of a particular field.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
Index: phpdoc/en/reference/sqlite/functions/sqlite-has-more.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-has-more.xml:1.2
phpdoc/en/reference/sqlite/functions/sqlite-has-more.xml:1.3
--- phpdoc/en/reference/sqlite/functions/sqlite-has-more.xml:1.2 Fri Jun 20
14:49:38 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-has-more.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<refentry id="function.sqlite-has-more">
<refnamediv>
<refname>sqlite_has_more</refname>
- <refpurpose>Returns whether or not more rows are available</refpurpose>
+ <refpurpose>Returns whether or not more rows are available.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -15,6 +15,10 @@
<function>sqlite_has_more</function> returns &true; if there are more
rows available from the <parameter>result</parameter> handle, or &false;
otherwise.
+ </para>
+ <para>
+ See also <function>sqlite_num_rows</function> and
+ <function>sqlite_changes</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc/en/reference/sqlite/functions/sqlite-last-error.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-last-error.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-last-error.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-last-error.xml:1.3 Fri Jun 20
14:57:15 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-last-error.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.sqlite-last-error">
<refnamediv>
<refname>sqlite_last_error</refname>
- <refpurpose>Returns the error code of the last error for a database</refpurpose>
+ <refpurpose>Returns the error code of the last error for a database.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -13,7 +13,9 @@
</methodsynopsis>
<para>
Returns the error code from the last operation performed on
- <parameter>db</parameter>, the database handle.
+ <parameter>db</parameter>, the database handle. A human readable
+ description of the error code can be retrieved using
+ <function>sqlite_error_string</function>.
</para>
<para>
See also <function>sqlite_error_string</function>.
Index: phpdoc/en/reference/sqlite/functions/sqlite-last-insert-rowid.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-last-insert-rowid.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-last-insert-rowid.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-last-insert-rowid.xml:1.3 Fri
Jun 20 14:57:15 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-last-insert-rowid.xml Sun Jul 6
00:43:08 2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.sqlite-last-insert-rowid">
<refnamediv>
<refname>sqlite_last_insert_rowid</refname>
- <refpurpose>Returns the rowid of the most recently inserted row</refpurpose>
+ <refpurpose>Returns the rowid of the most recently inserted row.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
Index: phpdoc/en/reference/sqlite/functions/sqlite-libencoding.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-libencoding.xml:1.4
phpdoc/en/reference/sqlite/functions/sqlite-libencoding.xml:1.5
--- phpdoc/en/reference/sqlite/functions/sqlite-libencoding.xml:1.4 Sat Jun 21
09:24:58 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-libencoding.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="function.sqlite-libencoding">
<refnamediv>
<refname>sqlite_libencoding</refname>
- <refpurpose>Returns the encoding of the linked SQLite library</refpurpose>
+ <refpurpose>Returns the encoding of the linked SQLite library.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
Index: phpdoc/en/reference/sqlite/functions/sqlite-libversion.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-libversion.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-libversion.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-libversion.xml:1.3 Fri Jun 20
14:57:15 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-libversion.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.sqlite-libversion">
<refnamediv>
<refname>sqlite_libversion</refname>
- <refpurpose>Returns the version of the linked SQLite library</refpurpose>
+ <refpurpose>Returns the version of the linked SQLite library.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
Index: phpdoc/en/reference/sqlite/functions/sqlite-next.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-next.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-next.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-next.xml:1.3 Fri Jun 20 14:57:15
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-next.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.sqlite-next">
<refnamediv>
<refname>sqlite_next</refname>
- <refpurpose>Seek to next row number</refpurpose>
+ <refpurpose>Seek to the next row number.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
Index: phpdoc/en/reference/sqlite/functions/sqlite-num-fields.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-num-fields.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-num-fields.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-num-fields.xml:1.3 Fri Jun 20
14:57:15 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-num-fields.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.sqlite-num-fields">
<refnamediv>
<refname>sqlite_num_fields</refname>
- <refpurpose>Returns the number of fields in a result set</refpurpose>
+ <refpurpose>Returns the number of fields in a result set.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -13,6 +13,10 @@
</methodsynopsis>
<para>
Returns the number of fields in the <parameter>result</parameter> set.
+ </para>
+ <para>
+ See also <function>sqlite_column</function> and
+ <function>sqlite_num_rows</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc/en/reference/sqlite/functions/sqlite-num-rows.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-num-rows.xml:1.2
phpdoc/en/reference/sqlite/functions/sqlite-num-rows.xml:1.3
--- phpdoc/en/reference/sqlite/functions/sqlite-num-rows.xml:1.2 Fri Jun 20
14:49:38 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-num-rows.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<refentry id="function.sqlite-num-rows">
<refnamediv>
<refname>sqlite_num_rows</refname>
- <refpurpose>Returns the number of rows in a result set</refpurpose>
+ <refpurpose>Returns the number of rows in a buffered result set.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -12,13 +12,18 @@
<methodparam><type>resource</type><parameter>result</parameter></methodparam>
</methodsynopsis>
<para>
- Returns the number of rows in the <parameter>result</parameter> set.
+ Returns the number of rows in the buffered <parameter>result</parameter>
+ set.
</para>
<note>
<para>
This function cannot be used with unbuffered result sets.
</para>
</note>
+ <para>
+ See also <function>sqlite_changes</function> and
+ <function>sqlite_query</function>.
+ </para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Index: phpdoc/en/reference/sqlite/functions/sqlite-open.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-open.xml:1.6
phpdoc/en/reference/sqlite/functions/sqlite-open.xml:1.7
--- phpdoc/en/reference/sqlite/functions/sqlite-open.xml:1.6 Sat Jun 21 15:58:04
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-open.xml Sun Jul 6 00:43:08
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<refentry id="function.sqlite-open">
<refnamediv>
<refname>sqlite_open</refname>
@@ -11,7 +11,7 @@
<type>resource</type><methodname>sqlite_open</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam>
- <methodparam
choice="opt"><type>string</type><parameter>&errmessage</parameter></methodparam>
+ <methodparam
choice="opt"><type>string</type><parameter>&error_message</parameter></methodparam>
</methodsynopsis>
<para>
Returns a resource on success, &false; on error.
@@ -44,12 +44,12 @@
<![CDATA[
<?php
if ($db = sqlite_open('mysqlitedb', 0666, $sqliteerror)) {
- sqlite_query($db,'CREATE TABLE foo (bar varchar(10))');
- sqlite_query($db,"INSERT INTO foo VALUES ('fnord')");
- $result = sqlite_query($db,'select bar from foo');
- var_dump(sqlite_fetch_array($result));
+ sqlite_query($db,'CREATE TABLE foo (bar varchar(10))');
+ sqlite_query($db,"INSERT INTO foo VALUES ('fnord')");
+ $result = sqlite_query($db,'select bar from foo');
+ var_dump(sqlite_fetch_array($result));
} else {
- die ($sqliteerror);
+ die ($sqliteerror);
}
?>]]>
</programlisting>
@@ -60,9 +60,9 @@
On Unix platforms, SQLite is sensitive to scripts that use the fork() system
call. If you
do have such a script, it is recommended that you close the handle prior
to forking and then re-open it in the child and/or parent.
- For more information on this issue, see <ulink
- url="&url.sqlite.interface.c;">The C language interface
- to the SQLite library</ulink> in the section entitled
+ For more information on this issue, see
+ <ulink url="&url.sqlite.interface.c;">The C language interface
+ to the SQLite library</ulink> in the section entitled
<literal>Multi-Threading And SQLite</literal>.
</simpara>
</tip>
Index: phpdoc/en/reference/sqlite/functions/sqlite-popen.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-popen.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-popen.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-popen.xml:1.3 Fri Jun 20 14:57:15
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-popen.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.sqlite-popen">
<refnamediv>
<refname>sqlite_popen</refname>
- <refpurpose>Opens a persistent handle to an SQLite database. Will create the
database if it does not exist</refpurpose>
+ <refpurpose>
+ Opens a persistent handle to an SQLite database. Will create the
+ database if it does not exist.
+ </refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -11,7 +14,7 @@
<type>resource</type><methodname>sqlite_popen</methodname>
<methodparam><type>string</type><parameter>filename</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>mode</parameter></methodparam>
- <methodparam
choice="opt"><type>string</type><parameter>&errmessage</parameter></methodparam>
+ <methodparam
choice="opt"><type>string</type><parameter>&error_message</parameter></methodparam>
</methodsynopsis>
<simpara>
This function behaves identically to <function>sqlite_open</function>
Index: phpdoc/en/reference/sqlite/functions/sqlite-query.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-query.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-query.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-query.xml:1.3 Fri Jun 20 14:57:15
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-query.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.sqlite-query">
<refnamediv>
<refname>sqlite_query</refname>
- <refpurpose>Executes a query against a given database and returns a result
handle</refpurpose>
+ <refpurpose>
+ Executes a query against a given database and returns a result handle.
+ </refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -66,7 +68,8 @@
</simpara>
</warning>
<para>
- See also <function>sqlite_array_query</function>.
+ See also <function>sqlite_unbuffered_query</function> and
+ <function>sqlite_array_query</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc/en/reference/sqlite/functions/sqlite-rewind.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-rewind.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-rewind.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-rewind.xml:1.3 Fri Jun 20 14:57:15
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-rewind.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.sqlite-rewind">
<refnamediv>
<refname>sqlite_rewind</refname>
- <refpurpose>Seek to the first row number</refpurpose>
+ <refpurpose>Seek to the first row number.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -23,7 +23,8 @@
</note>
<para>
See also <function>sqlite_next</function>,
- <function>sqlite_current</function> and <function>sqlite_seek</function>.
+ <function>sqlite_current</function>, and
+ <function>sqlite_seek</function>.
</para>
</refsect1>
</refentry>
Index: phpdoc/en/reference/sqlite/functions/sqlite-seek.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-seek.xml:1.4
phpdoc/en/reference/sqlite/functions/sqlite-seek.xml:1.5
--- phpdoc/en/reference/sqlite/functions/sqlite-seek.xml:1.4 Sat Jul 5 13:43:25
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-seek.xml Sun Jul 6 00:43:08
2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
<refentry id="function.sqlite-seek">
<refnamediv>
<refname>sqlite_seek</refname>
- <refpurpose>Seek to a particular row number</refpurpose>
+ <refpurpose>Seek to a particular row number of a buffered result set.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
Index: phpdoc/en/reference/sqlite/functions/sqlite-udf-decode-binary.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-udf-decode-binary.xml:1.1
phpdoc/en/reference/sqlite/functions/sqlite-udf-decode-binary.xml:1.2
--- phpdoc/en/reference/sqlite/functions/sqlite-udf-decode-binary.xml:1.1 Sat
Jun 21 09:24:58 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-udf-decode-binary.xml Sun Jul 6
00:43:08 2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<refentry id="function.sqlite-udf-decode-binary">
<refnamediv>
<refname>sqlite_udf_decode_binary</refname>
- <refpurpose>Decode binary data passed as parameters to an UDF</refpurpose>
+ <refpurpose>Decode binary data passed as parameters to an UDF.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -47,26 +47,27 @@
$db = sqlite_open(':memory:');
sqlite_query($db, "CREATE TABLE strings(a)");
foreach ($data as $str) {
- sqlite_query($db, "INSERT INTO strings VALUES('" .
- sqlite_escape_string($str) . "')");
+ $str = sqlite_escape_string($str);
+ sqlite_query($db, "INSERT INTO strings VALUES ('$str')");
}
function max_len_step(&$context, $string) {
- $string = sqlite_udf_decode_binary($string);
- if (strlen($string) > $context) {
- $context = strlen($string);
- }
+ $string = sqlite_udf_decode_binary($string);
+ if (strlen($string) > $context) {
+ $context = strlen($string);
+ }
}
function max_len_finalize(&$context) {
- return $context;
+ return $context;
}
sqlite_create_aggregate($db, 'max_len', 'max_len_step', 'max_len_finalize');
var_dump(sqlite_array_query($db, 'SELECT max_len(a) from strings'));
-?>]]>
+?>
+]]>
</programlisting>
</example>
</para>
Index: phpdoc/en/reference/sqlite/functions/sqlite-udf-encode-binary.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-udf-encode-binary.xml:1.1
phpdoc/en/reference/sqlite/functions/sqlite-udf-encode-binary.xml:1.2
--- phpdoc/en/reference/sqlite/functions/sqlite-udf-encode-binary.xml:1.1 Sat
Jun 21 09:24:58 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-udf-encode-binary.xml Sun Jul 6
00:43:08 2003
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
<refentry id="function.sqlite-udf-encode-binary">
<refnamediv>
<refname>sqlite_udf_encode_binary</refname>
- <refpurpose>Encode binary data before returning it from an UDF</refpurpose>
+ <refpurpose>Encode binary data before returning it from an UDF.</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
@@ -28,9 +28,9 @@
</para>
<note>
<para>
- Do not use <function>sqlite_escape_string</function> to quote strings
- returned from UDF's as it will lead to double-quoting of the data. Use
- this function instead!
+ Do not use <function>sqlite_escape_string</function> to quote strings
+ returned from UDF's as it will lead to double-quoting of the data. Use
+ <function>sqlite_udf_encode_binary</function> instead!
</para>
</note>
<para>
Index: phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml:1.3
phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml:1.3 Fri
Jun 20 14:57:15 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml Sun Jul 6
00:43:08 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.sqlite-unbuffered-query">
<refnamediv>
<refname>sqlite_unbuffered_query</refname>
@@ -30,11 +30,16 @@
</para>
<note>
<para>
- Functions such as <function>sqlite_seek</function> and
- <function>sqlite_rewind</function> do not work on result handles
- returned from this function.
+ Functions such as <function>sqlite_seek</function>,
+ <function>sqlite_rewind</function>, <function>sqlite_next</function>,
+ <function>sqlite_current</function>, and
+ <function>sqlite_num_rows</function> do not work on result handles
+ returned from <function>sqlite_unbuffered_query</function>.
</para>
</note>
+ <para>
+ See also <function>sqlite_query</function>.
+ </para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php