philip          Mon Jul 21 12:44:20 2003 EDT

  Modified files:              
    /phpdoc/en/reference/sqlite/functions       sqlite-array-query.xml 
                                                sqlite-busy-timeout.xml 
                                                sqlite-changes.xml 
                                                sqlite-close.xml 
                                                sqlite-create-aggregate.xml 
                                                sqlite-create-function.xml 
                                                sqlite-fetch-single.xml 
                                                sqlite-last-error.xml 
                                                sqlite-last-insert-rowid.xml 
                                                sqlite-open.xml 
                                                sqlite-query.xml 
                                                sqlite-unbuffered-query.xml 
  Log:
  Unify the database handle name as dbhandle, instead of db or database.
  
  
Index: phpdoc/en/reference/sqlite/functions/sqlite-array-query.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-array-query.xml:1.5 
phpdoc/en/reference/sqlite/functions/sqlite-array-query.xml:1.6
--- phpdoc/en/reference/sqlite/functions/sqlite-array-query.xml:1.5     Sun Jul  6 
00:43:08 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-array-query.xml Mon Jul 21 12:44:20 
2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
 <refentry id="function.sqlite-array-query">
  <refnamediv>
   <refname>sqlite_array_query</refname>
@@ -9,7 +9,7 @@
   <title>Description</title>
   <methodsynopsis>
    <type>array</type><methodname>sqlite_array_query</methodname>
-   <methodparam><type>resource</type><parameter>db</parameter></methodparam>
+   <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>bool</type><parameter>decode_binary</parameter></methodparam>
@@ -27,7 +27,7 @@
    <programlisting role="php">
 <![CDATA[
 <?php
-$q = sqlite_query($database, "SELECT * from foo LIMIT 100");
+$q = sqlite_query($dbhandle, "SELECT * from foo LIMIT 100");
 $rows = array();
 while ($r = sqlite_fetch_array($q)) {
     $rows[] = $r;
Index: phpdoc/en/reference/sqlite/functions/sqlite-busy-timeout.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-busy-timeout.xml:1.3 
phpdoc/en/reference/sqlite/functions/sqlite-busy-timeout.xml:1.4
--- phpdoc/en/reference/sqlite/functions/sqlite-busy-timeout.xml:1.3    Sun Jul  6 
00:43:08 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-busy-timeout.xml        Mon Jul 21 
12:44:20 2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
 <refentry id="function.sqlite-busy-timeout">
  <refnamediv><refname>sqlite_busy_timeout</refname>
   <refpurpose>Set busy timeout duration, or disable busy handlers.</refpurpose>
@@ -8,12 +8,12 @@
   <title>Description</title>
   <methodsynopsis>
    <type>void</type><methodname>sqlite_busy_timeout</methodname>
-   <methodparam><type>resource</type><parameter>database</parameter></methodparam>
+   <methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
    <methodparam><type>int</type><parameter>milliseconds</parameter></methodparam>
   </methodsynopsis>
   <para>
    Set the maximum time that sqlite will wait for a
-   <parameter>database</parameter>
+   <parameter>dbhandle</parameter>
    to become ready for use to <parameter>milliseconds</parameter>.
    If <parameter>milliseconds</parameter> is <literal>0</literal>, busy
    handlers will be disabled and sqlite will return immediately with a
@@ -29,6 +29,9 @@
     There are one thousand (1000) milliseconds in one second.
    </para>
   </note>
+  <para>
+   See also <function>sqlite_open</function>.
+  </para>
  </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.4 
phpdoc/en/reference/sqlite/functions/sqlite-changes.xml:1.5
--- phpdoc/en/reference/sqlite/functions/sqlite-changes.xml:1.4 Sun Jul  6 00:43:08 
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-changes.xml     Mon Jul 21 12:44:20 
2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <refentry id="function.sqlite-changes">
  <refnamediv>
   <refname>sqlite_changes</refname>
@@ -12,11 +12,12 @@
   <title>Description</title>
   <methodsynopsis>
    <type>int</type><methodname>sqlite_changes</methodname>
-   <methodparam><type>resource</type><parameter>db</parameter></methodparam>
+   <methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
   </methodsynopsis>
   <para>
    Returns the numbers of rows that were changed by the most recent SQL
-   statement executed against the database <parameter>db</parameter>.
+   statement executed against the <parameter>dbhandle</parameter> database
+   handle.
   </para>
   <para>
    See also <function>sqlite_num_rows</function>.
Index: phpdoc/en/reference/sqlite/functions/sqlite-close.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-close.xml:1.2 
phpdoc/en/reference/sqlite/functions/sqlite-close.xml:1.3
--- phpdoc/en/reference/sqlite/functions/sqlite-close.xml:1.2   Fri Jun 20 14:57:15 
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-close.xml       Mon Jul 21 12:44:20 
2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
 <refentry id="function.sqlite-close">
  <refnamediv>
   <refname>sqlite_close</refname>
@@ -9,7 +9,7 @@
   <title>Description</title>
   <methodsynopsis>
    <type>void</type><methodname>sqlite_close</methodname>
-   <methodparam><type>resource</type><parameter>database</parameter></methodparam>
+   <methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
   </methodsynopsis>
   <para>
    Closes the given <parameter>database</parameter> handle.
Index: phpdoc/en/reference/sqlite/functions/sqlite-create-aggregate.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-create-aggregate.xml:1.2 
phpdoc/en/reference/sqlite/functions/sqlite-create-aggregate.xml:1.3
--- phpdoc/en/reference/sqlite/functions/sqlite-create-aggregate.xml:1.2        Sun 
Jul  6 00:43:08 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-create-aggregate.xml    Mon Jul 21 
12:44:20 2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
 <refentry id="function.sqlite-create-aggregate">
  <refnamediv>
   <refname>sqlite_create_aggregate</refname>
@@ -9,7 +9,7 @@
   <title>Description</title>
   <methodsynopsis>
    <type>bool</type><methodname>sqlite_create_aggregate</methodname>
-   <methodparam><type>resource</type><parameter>db</parameter></methodparam>
+   <methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
    <methodparam><type>string</type><parameter>function_name</parameter></methodparam>
    <methodparam><type>mixed</type><parameter>step_func</parameter></methodparam>
    <methodparam><type>mixed</type><parameter>finalize_func</parameter></methodparam>
@@ -49,11 +49,11 @@
    'nine'
    'ten'
    );
-$db = sqlite_open(':memory:');
-sqlite_query($db, "CREATE TABLE strings(a)");
+$dbhandle = sqlite_open(':memory:');
+sqlite_query($dbhandle, "CREATE TABLE strings(a)");
 foreach ($data as $str) {
     $str = sqlite_escape_string($str);
-    sqlite_query($db, "INSERT INTO strings VALUES ('$str')");
+    sqlite_query($dbhandle, "INSERT INTO strings VALUES ('$str')");
 }
 
 function max_len_step(&$context, $string) {
@@ -66,9 +66,9 @@
     return $context;
 }
 
-sqlite_create_aggregate($db, 'max_len', 'max_len_step', 'max_len_finalize');
+sqlite_create_aggregate($dbhandle, 'max_len', 'max_len_step', 'max_len_finalize');
 
-var_dump(sqlite_array_query($db, 'SELECT max_len(a) from strings'));
+var_dump(sqlite_array_query($dbhandle, 'SELECT max_len(a) from strings'));
 
 ?>
 ]]>
Index: phpdoc/en/reference/sqlite/functions/sqlite-create-function.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-create-function.xml:1.5 
phpdoc/en/reference/sqlite/functions/sqlite-create-function.xml:1.6
--- phpdoc/en/reference/sqlite/functions/sqlite-create-function.xml:1.5 Sun Jul  6 
00:43:08 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-create-function.xml     Mon Jul 21 
12:44:20 2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
 <refentry id="function.sqlite-create-function">
  <refnamediv>
   <refname>sqlite_create_function</refname>
@@ -11,7 +11,7 @@
   <title>Description</title>
   <methodsynopsis>
    <type>bool</type><methodname>sqlite_create_function</methodname>
-   <methodparam><type>resource</type><parameter>db</parameter></methodparam>
+   <methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
    <methodparam><type>string</type><parameter>function_name</parameter></methodparam>
    <methodparam><type>mixed</type><parameter>callback</parameter></methodparam>
    <methodparam 
choice="opt"><type>int</type><parameter>num_args</parameter></methodparam>
@@ -23,9 +23,9 @@
    statements.
   </para>
   <para>
-   <parameter>db</parameter> specifies the database handle that you wish to
-   extend, <parameter>function_name</parameter> specifies the name of the
-   function that you will use in your SQL statements,
+   <parameter>dbhandle</parameter> specifies the database handle that you
+   wish to extend, <parameter>function_name</parameter> specifies the name
+   of the function that you will use in your SQL statements,
    <parameter>callback</parameter> is any valid PHP callback to specify a
    PHP function that should be called to handle the SQL function.
    The optional parameter <parameter>num_args</parameter> is used as a hint
@@ -47,9 +47,16 @@
     return strrev(md5($string));
 }
 
-sqlite_create_function($db, 'md5rev', 'md5_and_reverse', 1);
-
-$rows = sqlite_array_query($db, 'SELECT md5rev(filename) from files');
+if ($dbhandle = sqlite_open('mysqlitedb', 0666, $sqliteerror)) {
+    
+    sqlite_create_function($dbhandle, 'md5rev', 'md5_and_reverse', 1);
+    
+    $sql  = 'SELECT md5rev(filename) FROM files';
+    $rows = sqlite_array_query($dbhandle, $sql);
+} else {
+    echo 'Error opening sqlite db: ' . $sqliteerror;
+    exit;
+}
 ?>
 ]]>
     </programlisting>
@@ -76,7 +83,7 @@
     <programlisting role="php">
 <![CDATA[
 <?php
-$rows = sqlite_array_query($db, "SELECT php('md5', filename) from files");
+$rows = sqlite_array_query($dbhandle, "SELECT php('md5', filename) from files");
 ?>
 ]]>
     </programlisting>
Index: phpdoc/en/reference/sqlite/functions/sqlite-fetch-single.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-fetch-single.xml:1.1 
phpdoc/en/reference/sqlite/functions/sqlite-fetch-single.xml:1.2
--- phpdoc/en/reference/sqlite/functions/sqlite-fetch-single.xml:1.1    Sun Jul  6 
10:57:45 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-fetch-single.xml        Mon Jul 21 
12:44:20 2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.1 $ -->
+<!-- $Revision: 1.2 $ -->
 <refentry id="function.sqlite-fetch-single">
  <refnamediv>
   <refname>sqlite_fetch_single</refname>
@@ -28,15 +28,16 @@
     <programlisting role="php">
 <![CDATA[
 <?php
-if ($db = sqlite_open('mysqlitedb', 0666, $sqliteerror)) {
+if ($dbhandle = sqlite_open('mysqlitedb', 0666, $sqliteerror)) {
 
-    $res = sqlite_query($db, "SELECT id FROM sometable WHERE id = 42");
+    $sql = "SELECT id FROM sometable WHERE id = 42";
+    $res = sqlite_query($dbhandle, $sql);
 
     if (sqlite_num_rows($res) > 0) {
         echo sqlite_fetch_single($res); // 42
     }
     
-    sqlite_close($db);
+    sqlite_close($dbhandle);
 }
 ?>
 ]]>
Index: phpdoc/en/reference/sqlite/functions/sqlite-last-error.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-last-error.xml:1.4 
phpdoc/en/reference/sqlite/functions/sqlite-last-error.xml:1.5
--- phpdoc/en/reference/sqlite/functions/sqlite-last-error.xml:1.4      Sun Jul  6 
00:43:08 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-last-error.xml  Mon Jul 21 12:44:20 
2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <refentry id="function.sqlite-last-error">
  <refnamediv>
   <refname>sqlite_last_error</refname>
@@ -9,11 +9,11 @@
   <title>Description</title>
   <methodsynopsis>
    <type>int</type><methodname>sqlite_last_error</methodname>
-   <methodparam><type>resource</type><parameter>db</parameter></methodparam>
+   <methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
   </methodsynopsis>
   <para>
    Returns the error code from the last operation performed on
-   <parameter>db</parameter>, the database handle.  A human readable
+   <parameter>dbhandle</parameter>, the database handle.  A human readable
    description of the error code can be retrieved using
    <function>sqlite_error_string</function>.
   </para>
Index: phpdoc/en/reference/sqlite/functions/sqlite-last-insert-rowid.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-last-insert-rowid.xml:1.4 
phpdoc/en/reference/sqlite/functions/sqlite-last-insert-rowid.xml:1.5
--- phpdoc/en/reference/sqlite/functions/sqlite-last-insert-rowid.xml:1.4       Sun 
Jul  6 00:43:08 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-last-insert-rowid.xml   Mon Jul 21 
12:44:20 2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <refentry id="function.sqlite-last-insert-rowid">
  <refnamediv>
   <refname>sqlite_last_insert_rowid</refname>
@@ -9,11 +9,11 @@
   <title>Description</title>
   <methodsynopsis>
    <type>int</type><methodname>sqlite_last_insert_rowid</methodname>
-   <methodparam><type>resource</type><parameter>db</parameter></methodparam>
+   <methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
   </methodsynopsis>
   <para>
    Returns the rowid of the row that was most recently inserted into the
-   database <parameter>db</parameter>, if it was created as an
+   database <parameter>dbhandle</parameter>, if it was created as an
    auto-increment field.
   </para>
   <tip>
Index: phpdoc/en/reference/sqlite/functions/sqlite-open.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-open.xml:1.7 
phpdoc/en/reference/sqlite/functions/sqlite-open.xml:1.8
--- phpdoc/en/reference/sqlite/functions/sqlite-open.xml:1.7    Sun Jul  6 00:43:08 
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-open.xml        Mon Jul 21 12:44:20 
2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
 <refentry id="function.sqlite-open">
  <refnamediv>
   <refname>sqlite_open</refname>
@@ -14,7 +14,7 @@
    <methodparam 
choice="opt"><type>string</type><parameter>&amp;error_message</parameter></methodparam>
   </methodsynopsis>
   <para>
-   Returns a resource on success, &false; on error.
+   Returns a resource (database handle) on success, &false; on error.
   </para>
   <para>
    The <parameter>filename</parameter> parameter is the name of the
Index: phpdoc/en/reference/sqlite/functions/sqlite-query.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-query.xml:1.4 
phpdoc/en/reference/sqlite/functions/sqlite-query.xml:1.5
--- phpdoc/en/reference/sqlite/functions/sqlite-query.xml:1.4   Sun Jul  6 00:43:08 
2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-query.xml       Mon Jul 21 12:44:20 
2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <refentry id="function.sqlite-query">
  <refnamediv>
   <refname>sqlite_query</refname>
@@ -11,17 +11,18 @@
   <title>Description</title>
   <methodsynopsis>
    <type>resource</type><methodname>sqlite_query</methodname>
-   <methodparam><type>resource</type><parameter>db</parameter></methodparam>
+   <methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
    <methodparam><type>string</type><parameter>query</parameter></methodparam>
   </methodsynopsis>
   <methodsynopsis>
    <type>resource</type><methodname>sqlite_query</methodname>
    <methodparam><type>string</type><parameter>query</parameter></methodparam>
-   <methodparam><type>resource</type><parameter>db</parameter></methodparam>
+   <methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
   </methodsynopsis>
   <para>
    Executes an SQL statement given by the <parameter>query</parameter> against
-   a given database (specified by the <parameter>db</parameter> parameter).
+   a given database handle (specified by the <parameter>dbhandle</parameter> 
+   parameter).
   </para>
   <para>
    For queries that return rows, this function will return a result handle
Index: phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml
diff -u phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml:1.4 
phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml:1.5
--- phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml:1.4        Sun 
Jul  6 00:43:08 2003
+++ phpdoc/en/reference/sqlite/functions/sqlite-unbuffered-query.xml    Mon Jul 21 
12:44:20 2003
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.4 $ -->
+<!-- $Revision: 1.5 $ -->
 <refentry id="function.sqlite-unbuffered-query">
  <refnamediv>
   <refname>sqlite_unbuffered_query</refname>
@@ -9,13 +9,13 @@
   <title>Description</title>
   <methodsynopsis>
    <type>resource</type><methodname>sqlite_unbuffered_query</methodname>
-   <methodparam><type>resource</type><parameter>db</parameter></methodparam>
+   <methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
    <methodparam><type>string</type><parameter>query</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>db</parameter></methodparam>
+   <methodparam><type>resource</type><parameter>dbhandle</parameter></methodparam>
   </methodsynopsis>
   <para>
    <function>sqlite_unbuffered_query</function> is identical to

-- 
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to