]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - extlib/DB/sqlite.php
DB updated to 1.8.2
[quix0rs-gnu-social.git] / extlib / DB / sqlite.php
index 96d5c934a88216bc77a45cf1cd322c8e98b3ac05..7adfb4c475a292140b796767145f3c92f144b2e0 100644 (file)
@@ -6,7 +6,7 @@
  * The PEAR DB driver for PHP's sqlite extension
  * for interacting with SQLite databases
  *
- * PHP versions 4 and 5
+ * PHP version 5
  *
  * LICENSE: This source file is subject to version 3.0 of the PHP license
  * that is available through the world-wide-web at the following URI:
@@ -21,7 +21,7 @@
  * @author     Daniel Convissor <danielc@php.net>
  * @copyright  1997-2007 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0 3.0
- * @version    CVS: $Id: sqlite.php,v 1.118 2007/11/26 22:57:18 aharvey Exp $
+ * @version    CVS: $Id$
  * @link       http://pear.php.net/package/DB
  */
 
@@ -47,7 +47,7 @@ require_once 'DB/common.php';
  * @author     Daniel Convissor <danielc@php.net>
  * @copyright  1997-2007 The PHP Group
  * @license    http://www.php.net/license/3_0.txt  PHP License 3.0 3.0
- * @version    Release: 1.7.14RC1
+ * @version    Release: 1.8.2
  * @link       http://pear.php.net/package/DB
  */
 class DB_sqlite extends DB_common
@@ -334,7 +334,7 @@ class DB_sqlite extends DB_common
      * See DB_result::fetchInto() for more information.
      *
      * This method is not meant to be called directly.  Use
-     * DB_result::fetchInto() instead.  It cannot be declared "protected"
+     * DB_result::fetchInto() instead.  It can't be declared "protected"
      * because DB_result is a separate object.
      *
      * @param resource $result    the query result resource
@@ -396,7 +396,7 @@ class DB_sqlite extends DB_common
      * Deletes the result set and frees the memory occupied by the result set
      *
      * This method is not meant to be called directly.  Use
-     * DB_result::free() instead.  It cannot be declared "protected"
+     * DB_result::free() instead.  It can't be declared "protected"
      * because DB_result is a separate object.
      *
      * @param resource $result  PHP's query result resource
@@ -422,7 +422,7 @@ class DB_sqlite extends DB_common
      * Gets the number of columns in a result set
      *
      * This method is not meant to be called directly.  Use
-     * DB_result::numCols() instead.  It cannot be declared "protected"
+     * DB_result::numCols() instead.  It can't be declared "protected"
      * because DB_result is a separate object.
      *
      * @param resource $result  PHP's query result resource
@@ -447,7 +447,7 @@ class DB_sqlite extends DB_common
      * Gets the number of rows in a result set
      *
      * This method is not meant to be called directly.  Use
-     * DB_result::numRows() instead.  It cannot be declared "protected"
+     * DB_result::numRows() instead.  It can't be declared "protected"
      * because DB_result is a separate object.
      *
      * @param resource $result  PHP's query result resource
@@ -829,6 +829,9 @@ class DB_sqlite extends DB_common
             $flags = '';
             if ($id[$i]['pk']) {
                 $flags .= 'primary_key ';
+                if (strtoupper($type) == 'INTEGER') {
+                    $flags .= 'auto_increment ';
+                }
             }
             if ($id[$i]['notnull']) {
                 $flags .= 'not_null ';