nlopess Fri Sep 9 17:42:14 2005 EDT
Modified files:
/phpdoc/en/reference/sqlite/functions sqlite-exec.xml
sqlite-query.xml
sqlite-unbuffered-query.xml
Log:
document the new 'error_msg' parameter
http://cvs.php.net/diff.php/phpdoc/en/reference/sqlite/functions/sqlite-exec.xml?r1=1.9&r2=1.10&ty=u
Index: phpdoc/en/reference/sqlite/functions/sqlite-exec.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-exec.xml:1.9
phpdoc/en/reference/sqlite/functions/sqlite-exec.xml:1.10
--- phpdoc/en/reference/sqlite/functions/sqlite-exec.xml:1.9 Fri Sep 2
14:03:16 2005
+++ phpdoc/en/reference/sqlite/functions/sqlite-exec.xml Fri Sep 9
17:42:12 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<refentry id="function.sqlite-exec">
<refnamediv>
<refname>sqlite_exec</refname>
@@ -13,6 +13,7 @@
<type>bool</type><methodname>sqlite_exec</methodname>
<methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter
role="reference">error_msg</parameter></methodparam>
</methodsynopsis>
<methodsynopsis>
<type>bool</type><methodname>sqlite_exec</methodname>
@@ -25,6 +26,7 @@
<methodsynopsis>
<type>bool</type><methodname>queryExec</methodname>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter
role="reference">error_msg</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
<para>
@@ -46,6 +48,16 @@
<para>
<variablelist>
<varlistentry>
+ <term><parameter>dbhandle</parameter></term>
+ <listitem>
+ <para>
+ The SQLite Database resource; returned from
+ <function>sqlite_open</function> when used procedurally. This parameter
+ is not required when using the object-oriented method.
+ </para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
<term><parameter>query</parameter></term>
<listitem>
<para>
@@ -54,12 +66,12 @@
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>dbhandle</parameter></term>
+ <term><parameter>error_msg</parameter></term>
<listitem>
<para>
- The SQLite Database resource; returned from <function>sqlite_open
- </function> when used procedurally. This parameter is not required
- when using the object-oriented method.
+ The specified variable will be filled if an error occurs. This is
+ specially important because SQL syntax errors can't be fetched using
+ the <function>sqlite_last_error</function> function.
</para>
</listitem>
</varlistentry>
@@ -77,6 +89,31 @@
&sqlite.case-fold;
</refsect1>
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>5.1.0</entry>
+ <entry>
+ Added the <parameter>error_msg</parameter> parameter
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
+
<refsect1 role="examples">
&reftitle.examples;
<para>
@@ -86,13 +123,14 @@
<![CDATA[
<?php
$dbhandle = sqlite_open('mysqlitedb');
-$query = sqlite_exec($dbhandle, "UPDATE users SET email='[EMAIL PROTECTED]'
WHERE username='jDoe'");
+$query = sqlite_exec($dbhandle, "UPDATE users SET email='[EMAIL PROTECTED]'
WHERE username='jDoe'", $error);
if (!$query) {
- exit('Error in query.');
+ exit("Error in query: '$error'");
} else {
echo 'Number of rows modified: ', sqlite_changes($dbhandle);
}
-?>]]>
+?>
+]]>
</programlisting>
</example>
</para>
@@ -103,13 +141,14 @@
<![CDATA[
<?php
$dbhandle = new SQLiteDatabase('mysqlitedb');
-$query = $dbhandle->queryExec("UPDATE users SET email='[EMAIL PROTECTED]'
WHERE username='jDoe'");
+$query = $dbhandle->queryExec("UPDATE users SET email='[EMAIL PROTECTED]'
WHERE username='jDoe'", $error);
if (!$query) {
- exit('Error in query.');
+ exit("Error in query: '$error'");
} else {
echo 'Number of rows modified: ', $dbhandle->changes();
}
-?>]]>
+?>
+]]>
</programlisting>
</example>
</para>
http://cvs.php.net/diff.php/phpdoc/en/reference/sqlite/functions/sqlite-query.xml?r1=1.14&r2=1.15&ty=u
Index: phpdoc/en/reference/sqlite/functions/sqlite-query.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-query.xml:1.14
phpdoc/en/reference/sqlite/functions/sqlite-query.xml:1.15
--- phpdoc/en/reference/sqlite/functions/sqlite-query.xml:1.14 Thu Jun 16
11:16:21 2005
+++ phpdoc/en/reference/sqlite/functions/sqlite-query.xml Fri Sep 9
17:42:13 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.14 $ -->
+<!-- $Revision: 1.15 $ -->
<refentry id="function.sqlite-query">
<refnamediv>
<refname>sqlite_query</refname>
@@ -14,12 +14,14 @@
<methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>result_type</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter
role="reference">error_msg</parameter></methodparam>
</methodsynopsis>
<methodsynopsis>
<type>resource</type><methodname>sqlite_query</methodname>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
<methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>result_type</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter
role="reference">error_msg</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style (method):</para>
<classsynopsis>
@@ -28,6 +30,7 @@
<type>SQLiteResult</type><methodname>query</methodname>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>result_type</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter
role="reference">error_msg</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
<para>
@@ -41,20 +44,20 @@
<para>
<variablelist>
<varlistentry>
- <term><parameter>query</parameter></term>
+ <term><parameter>dbhandle</parameter></term>
<listitem>
<para>
- The query to be executed.
+ The SQLite Database resource; returned from
+ <function>sqlite_open</function> when used procedurally. This parameter
+ is not required when using the object-oriented method.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>dbhandle</parameter></term>
+ <term><parameter>query</parameter></term>
<listitem>
<para>
- The SQLite Database resource; returned from <function>sqlite_open
- </function> when used procedurally. This parameter is not required
- when using the object-oriented method.
+ The query to be executed.
</para>
</listitem>
</varlistentry>
@@ -64,6 +67,17 @@
&sqlite.result-type;
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><parameter>error_msg</parameter></term>
+ <listitem>
+ <para>
+ The specified variable will be filled if an error occurs. This is
+ specially important because SQL syntax errors can't be fetched using
+ the <function>sqlite_last_error</function> function.
+ </para>
+ </listitem>
+ </varlistentry>
+
</variablelist>
</para>
&sqlite.param-compat;
@@ -92,6 +106,30 @@
</para>
</refsect1>
+<refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>5.1.0</entry>
+ <entry>
+ Added the <parameter>error_msg</parameter> parameter
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
<refsect1 role="notes">
&reftitle.notes;
<warning>
http://cvs.php.net/diff.php/phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml?r1=1.8&r2=1.9&ty=u
Index: phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml:1.8
phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml:1.9
--- phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml:1.8
Thu Jun 16 11:16:21 2005
+++ phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml Fri Sep
9 17:42:13 2005
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<refentry id="function.sqlite-unbuffered-query">
<refnamediv>
<refname>sqlite_unbuffered_query</refname>
@@ -14,12 +14,14 @@
<methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>result_type</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter
role="reference">error_msg</parameter></methodparam>
</methodsynopsis>
<methodsynopsis>
<type>resource</type><methodname>sqlite_unbuffered_query</methodname>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
<methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>result_type</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter
role="reference">error_msg</parameter></methodparam>
</methodsynopsis>
<para>Object oriented style (method):</para>
<classsynopsis>
@@ -28,6 +30,7 @@
<type>SQLiteUnbuffered</type><methodname>unbufferedQuery</methodname>
<methodparam><type>string</type><parameter>query</parameter></methodparam>
<methodparam
choice="opt"><type>int</type><parameter>result_type</parameter></methodparam>
+ <methodparam choice="opt"><type>string</type><parameter
role="reference">error_msg</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
<para>
@@ -57,20 +60,20 @@
<para>
<variablelist>
<varlistentry>
- <term><parameter>query</parameter></term>
+ <term><parameter>dbhandle</parameter></term>
<listitem>
<para>
- The query to be executed.
+ The SQLite Database resource; returned from
+ <function>sqlite_open</function> when used procedurally. This parameter
+ is not required when using the object-oriented method.
</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><parameter>dbhandle</parameter></term>
+ <term><parameter>query</parameter></term>
<listitem>
<para>
- The SQLite Database resource; returned from <function>sqlite_open
- </function> when used procedurally. This parameter is not required
- when using the object-oriented method.
+ The query to be executed.
</para>
</listitem>
</varlistentry>
@@ -80,6 +83,16 @@
&sqlite.result-type;
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><parameter>error_msg</parameter></term>
+ <listitem>
+ <para>
+ The specified variable will be filled if an error occurs. This is
+ specially important because SQL syntax errors can't be fetched using
+ the <function>sqlite_last_error</function> function.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
</para>
&sqlite.param-compat;
@@ -97,6 +110,30 @@
</para>
</refsect1>
+ <refsect1 role="changelog">
+ &reftitle.changelog;
+ <para>
+ <informaltable>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>&Version;</entry>
+ <entry>&Description;</entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>5.1.0</entry>
+ <entry>
+ Added the <parameter>error_msg</parameter> parameter
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </para>
+ </refsect1>
+
<refsect1 role="seealso">
&reftitle.seealso;
<para>