MDL-29328 import latest adodb
authorPetr Skoda <commits@skodak.org>
Mon, 12 Sep 2011 07:12:46 +0000 (09:12 +0200)
committerPetr Skoda <commits@skodak.org>
Mon, 12 Sep 2011 07:12:46 +0000 (09:12 +0200)
121 files changed:
lib/adodb/adodb-active-record.inc.php
lib/adodb/adodb-active-recordx.inc.php
lib/adodb/adodb-csvlib.inc.php
lib/adodb/adodb-datadict.inc.php
lib/adodb/adodb-error.inc.php
lib/adodb/adodb-errorhandler.inc.php
lib/adodb/adodb-errorpear.inc.php
lib/adodb/adodb-exceptions.inc.php
lib/adodb/adodb-iterator.inc.php
lib/adodb/adodb-lib.inc.php
lib/adodb/adodb-memcache.lib.inc.php
lib/adodb/adodb-pager.inc.php
lib/adodb/adodb-pear.inc.php
lib/adodb/adodb-perf.inc.php
lib/adodb/adodb-php4.inc.php
lib/adodb/adodb-time.inc.php
lib/adodb/adodb-xmlschema.inc.php
lib/adodb/adodb-xmlschema03.inc.php
lib/adodb/adodb.inc.php
lib/adodb/datadict/datadict-access.inc.php [deleted file]
lib/adodb/datadict/datadict-db2.inc.php [deleted file]
lib/adodb/datadict/datadict-firebird.inc.php [deleted file]
lib/adodb/datadict/datadict-generic.inc.php [deleted file]
lib/adodb/datadict/datadict-ibase.inc.php [deleted file]
lib/adodb/datadict/datadict-informix.inc.php [deleted file]
lib/adodb/datadict/datadict-mssql.inc.php [deleted file]
lib/adodb/datadict/datadict-mssqlnative.inc.php [deleted file]
lib/adodb/datadict/datadict-mysql.inc.php [deleted file]
lib/adodb/datadict/datadict-oci8.inc.php [deleted file]
lib/adodb/datadict/datadict-postgres.inc.php [deleted file]
lib/adodb/datadict/datadict-sapdb.inc.php [deleted file]
lib/adodb/datadict/datadict-sqlite.inc.php [deleted file]
lib/adodb/datadict/datadict-sybase.inc.php [deleted file]
lib/adodb/drivers/adodb-access.inc.php
lib/adodb/drivers/adodb-ado.inc.php
lib/adodb/drivers/adodb-ado5.inc.php
lib/adodb/drivers/adodb-ado_access.inc.php
lib/adodb/drivers/adodb-ado_mssql.inc.php
lib/adodb/drivers/adodb-borland_ibase.inc.php
lib/adodb/drivers/adodb-csv.inc.php
lib/adodb/drivers/adodb-db2.inc.php
lib/adodb/drivers/adodb-db2oci.inc.php
lib/adodb/drivers/adodb-db2ora.inc.php
lib/adodb/drivers/adodb-fbsql.inc.php
lib/adodb/drivers/adodb-firebird.inc.php
lib/adodb/drivers/adodb-ibase.inc.php
lib/adodb/drivers/adodb-informix.inc.php
lib/adodb/drivers/adodb-informix72.inc.php
lib/adodb/drivers/adodb-ldap.inc.php
lib/adodb/drivers/adodb-mssql.inc.php
lib/adodb/drivers/adodb-mssql_n.inc.php
lib/adodb/drivers/adodb-mssqlnative.inc.php
lib/adodb/drivers/adodb-mssqlpo.inc.php
lib/adodb/drivers/adodb-mysql.inc.php
lib/adodb/drivers/adodb-mysqli.inc.php
lib/adodb/drivers/adodb-mysqlpo.inc.php
lib/adodb/drivers/adodb-mysqlt.inc.php
lib/adodb/drivers/adodb-netezza.inc.php
lib/adodb/drivers/adodb-oci8.inc.php
lib/adodb/drivers/adodb-oci805.inc.php
lib/adodb/drivers/adodb-oci8po.inc.php
lib/adodb/drivers/adodb-odbc.inc.php
lib/adodb/drivers/adodb-odbc_db2.inc.php
lib/adodb/drivers/adodb-odbc_mssql.inc.php
lib/adodb/drivers/adodb-odbc_oracle.inc.php
lib/adodb/drivers/adodb-odbtp.inc.php
lib/adodb/drivers/adodb-odbtp_unicode.inc.php
lib/adodb/drivers/adodb-oracle.inc.php
lib/adodb/drivers/adodb-pdo.inc.php
lib/adodb/drivers/adodb-pdo_mssql.inc.php
lib/adodb/drivers/adodb-pdo_mysql.inc.php
lib/adodb/drivers/adodb-pdo_oci.inc.php
lib/adodb/drivers/adodb-pdo_pgsql.inc.php
lib/adodb/drivers/adodb-pdo_sqlite.inc.php
lib/adodb/drivers/adodb-postgres.inc.php
lib/adodb/drivers/adodb-postgres64.inc.php
lib/adodb/drivers/adodb-postgres7.inc.php
lib/adodb/drivers/adodb-postgres8.inc.php
lib/adodb/drivers/adodb-proxy.inc.php
lib/adodb/drivers/adodb-sapdb.inc.php
lib/adodb/drivers/adodb-sqlanywhere.inc.php
lib/adodb/drivers/adodb-sqlite.inc.php
lib/adodb/drivers/adodb-sqlite3.inc.php [new file with mode: 0644]
lib/adodb/drivers/adodb-sqlitepo.inc.php
lib/adodb/drivers/adodb-sybase.inc.php
lib/adodb/drivers/adodb-sybase_ase.inc.php
lib/adodb/drivers/adodb-vfp.inc.php
lib/adodb/lang/adodb-ar.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-bg.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-bgutf8.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-ca.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-cn.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-cz.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-da.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-de.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-es.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-esperanto.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-fa.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-fr.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-hu.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-it.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-nl.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-pl.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-pt-br.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-ro.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-ru1251.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-sv.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb-uk1251.inc.php [new file with mode: 0644]
lib/adodb/lang/adodb_th.inc.php [new file with mode: 0644]
lib/adodb/perf/perf-db2.inc.php
lib/adodb/perf/perf-informix.inc.php
lib/adodb/perf/perf-mssql.inc.php
lib/adodb/perf/perf-mssqlnative.inc.php
lib/adodb/perf/perf-mysql.inc.php
lib/adodb/perf/perf-oci8.inc.php
lib/adodb/perf/perf-postgres.inc.php
lib/adodb/pivottable.inc.php
lib/adodb/readme_moodle.txt
lib/adodb/rsfilter.inc.php
lib/adodb/toexport.inc.php
lib/adodb/tohtml.inc.php

index 845c656..b7553d5 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
 
-@version V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+@version V5.14 8 Sept 2011   (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Latest version is available at http://adodb.sourceforge.net
  
   Released under both BSD license and Lesser GPL library license. 
index 9b526ad..994b86b 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
 
-@version V5.06 29 Sept 2008   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+@version V5.06 29 Sept 2008   (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Latest version is available at http://adodb.sourceforge.net
  
   Released under both BSD license and Lesser GPL library license. 
index 1c0d081..2d2449d 100644 (file)
@@ -8,7 +8,7 @@ $ADODB_INCLUDED_CSV = 1;
 
 /* 
 
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.14 8 Sept 2011   (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
index 69060c5..31acb2d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.14 8 Sept 2011   (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 6ec614d..e140a67 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /** 
- * @version V5.06 16 Oct 2008  (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
  * Released under both BSD license and Lesser GPL library license. 
  * Whenever there is any discrepancy between the two licenses, 
  * the BSD license will take precedence. 
index b760089..91d7027 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @version V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.14 8 Sept 2011   (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
  * Released under both BSD license and Lesser GPL library license.
  * Whenever there is any discrepancy between the two licenses,
  * the BSD license will take precedence.
index 6882e0a..bdc9238 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /** 
- * @version V5.06 16 Oct 2008  (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
  * Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 65f8943..bb9ed9e 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * @version V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.14 8 Sept 2011   (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
  * Released under both BSD license and Lesser GPL library license.
  * Whenever there is any discrepancy between the two licenses,
  * the BSD license will take precedence.
index e8b5e57..25c4a87 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.14 8 Sept 2011   (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 6b2e891..1440db3 100644 (file)
@@ -1,8 +1,4 @@
 <?php
-
-
-
-
 // security - hide paths
 if (!defined('ADODB_DIR')) die();
 
@@ -10,7 +6,7 @@ global $ADODB_INCLUDED_LIB;
 $ADODB_INCLUDED_LIB = 1;
 
 /* 
@version V5.06 16 Oct 2008  (c) 2000-2010 John Lim (jlim\@natsoft.com.my). All rights reserved.
 @version V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
@@ -647,9 +643,17 @@ function _adodb_getupdatesql(&$zthis,&$rs, $arrFields,$forceUpdate=false,$magicq
                                                $type = 'C';
                                        }
                                        
-                                       if ((strpos($upperfname,' ') !== false) || ($ADODB_QUOTE_FIELDNAMES))
-                                               $fnameq = $zthis->nameQuote.$upperfname.$zthis->nameQuote;
-                                       else
+                                       if ((strpos($upperfname,' ') !== false) || ($ADODB_QUOTE_FIELDNAMES)) {
+                                               switch (ADODB_QUOTE_FIELDNAMES) {
+                                               case 'LOWER':
+                                                       $fnameq = $zthis->nameQuote.strtolower($field->name).$zthis->nameQuote;break;
+                                               case 'NATIVE':
+                                                       $fnameq = $zthis->nameQuote.$field->name.$zthis->nameQuote;break;
+                                               case 'UPPER':
+                                               default:
+                                                       $fnameq = $zthis->nameQuote.$upperfname.$zthis->nameQuote;break;
+                                               }
+                                       } else
                                                $fnameq = $upperfname;
                                        
                                        
@@ -811,9 +815,17 @@ static $cacheCols;
                $upperfname = strtoupper($field->name);
                if (adodb_key_exists($upperfname,$arrFields,$force)) {
                        $bad = false;
-                       if ((strpos($upperfname,' ') !== false) || ($ADODB_QUOTE_FIELDNAMES))
-                               $fnameq = $zthis->nameQuote.$upperfname.$zthis->nameQuote;
-                       else
+                       if ((strpos($upperfname,' ') !== false) || ($ADODB_QUOTE_FIELDNAMES)) {
+                               switch (ADODB_QUOTE_FIELDNAMES) {
+                               case 'LOWER':
+                                       $fnameq = $zthis->nameQuote.strtolower($field->name).$zthis->nameQuote;break;
+                               case 'NATIVE':
+                                       $fnameq = $zthis->nameQuote.$field->name.$zthis->nameQuote;break;
+                               case 'UPPER':
+                               default:
+                                       $fnameq = $zthis->nameQuote.$upperfname.$zthis->nameQuote;break;
+                               }
+                       } else
                                $fnameq = $upperfname;
                        
                        $type = $recordSet->MetaType($field->type);
index e666d56..37b81d4 100644 (file)
@@ -11,7 +11,7 @@ if (empty($ADODB_INCLUDED_CSV)) include(ADODB_DIR.'/adodb-csvlib.inc.php');
 
 /* 
 
-  V5.06 16 Oct 2008  (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
@@ -91,7 +91,7 @@ $db->CacheExecute($sql);
                        }
                        if (!$this->_memcache) return false;
                        
-                       if (!$this->_memcache->set($filename, $contents, $this->compress, $secs2cache)) {
+                       if (!$this->_memcache->set($filename, $contents, $this->compress ? MEMCACHE_COMPRESSED : 0, $secs2cache)) {
                                if ($debug) ADOConnection::outp(" Failed to save data at the memcached server!<br>\n");
                                return false;
                        }
index b57ee95..c791132 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-       V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+       V5.14 8 Sept 2011   (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
          Released under both BSD license and Lesser GPL library license. 
          Whenever there is any discrepancy between the two licenses, 
          the BSD license will take precedence. 
index 04441a7..f157bbd 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /** 
- * @version V5.06 16 Oct 2008  (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
  * Released under both BSD license and Lesser GPL library license. 
  * Whenever there is any discrepancy between the two licenses, 
  * the BSD license will take precedence. 
index d1a86eb..90a1679 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011   (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
index e46a74d..3b50789 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.14 8 Sept 2011   (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index d62f678..469cd79 100644 (file)
@@ -242,6 +242,12 @@ b. Implement daylight savings, which looks awfully complicated, see
 
 CHANGELOG
 
+- 7 Feb 2011 0.35
+Changed adodb_date to be symmetric with adodb_mktime. See $jan1_71. fix for bc. 
+
+- 13 July 2010 0.34
+Changed adodb_get_gm_diff to use DateTimeZone().
+
 - 11 Feb 2008 0.33
 * Bug in 0.32 fix for hour handling. Fixed.
 
@@ -386,7 +392,7 @@ First implementation.
 /*
        Version Number
 */
-define('ADODB_DATE_VERSION',0.33);
+define('ADODB_DATE_VERSION',0.35);
 
 $ADODB_DATETIME_CLASS = (PHP_VERSION >= 5.2);
 
@@ -729,9 +735,17 @@ global $ADODB_DATETIME_CLASS;
        } else {
                if (isset($TZ)) return $TZ;
                $y = date('Y');
-               $TZ = mktime(0,0,0,12,2,$y,0) - gmmktime(0,0,0,12,2,$y,0);
+               /*
+               if (function_exists('date_default_timezone_get') && function_exists('timezone_offset_get')) {
+                       $tzonename = date_default_timezone_get();
+                       if ($tzonename) {
+                               $tobj = new DateTimeZone($tzonename);
+                               $TZ = -timezone_offset_get($tobj,new DateTime("now",$tzo));
+                       }
+               } 
+               */
+               if (empty($TZ)) $TZ = mktime(0,0,0,12,2,$y) - gmmktime(0,0,0,12,2,$y);
        }
-       
        return $TZ;
 }
 
@@ -1040,11 +1054,19 @@ function adodb_date($fmt,$d=false,$is_gmt=false)
 {
 static $daylight;
 global $ADODB_DATETIME_CLASS;
+static $jan1_1971;
 
+
+       if (!isset($daylight)) {
+               $daylight = function_exists('adodb_daylight_sv');
+               if (empty($jan1_1971)) $jan1_1971 = mktime(0,0,0,1,1,1971); // we only use date() when > 1970 as adodb_mktime() only uses mktime() when > 1970
+       }
+       
        if ($d === false) return ($is_gmt)? @gmdate($fmt): @date($fmt);
        if (!defined('ADODB_TEST_DATES')) {
                if ((abs($d) <= 0x7FFFFFFF)) { // check if number in 32-bit signed range
-                       if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= 0) // if windows, must be +ve integer
+               
+                       if (!defined('ADODB_NO_NEGATIVE_TS') || $d >= $jan1_1971) // if windows, must be +ve integer
                                return ($is_gmt)? @gmdate($fmt,$d): @date($fmt,$d);
 
                }
@@ -1053,7 +1075,6 @@ global $ADODB_DATETIME_CLASS;
        
        $arr = _adodb_getdate($d,true,$is_gmt);
        
-       if (!isset($daylight)) $daylight = function_exists('adodb_daylight_sv');
        if ($daylight) adodb_daylight_sv($arr, $is_gmt);
        
        $year = $arr['year'];
@@ -1426,4 +1447,4 @@ global $ADODB_DATE_LOCALE;
 }
 
 
-?>
\ No newline at end of file
+?>
index 34cc6f9..706126e 100644 (file)
@@ -10,9 +10,9 @@
  * build a database on any ADOdb-supported platform using a simple
  * XML schema.
  *
- * Last Editor: $Author$
+ * Last Editor: $Author: jlim $
  * @author Richard Tango-Lowy & Dan Cech
- * @version $Revision$
+ * @version $Revision: 1.12 $
  *
  * @package axmls
  * @tutorial getting_started.pkg
@@ -1211,7 +1211,7 @@ class dbQuerySet extends dbObject {
 * @tutorial getting_started.pkg
 *
 * @author Richard Tango-Lowy & Dan Cech
-* @version $Revision$
+* @version $Revision: 1.12 $
 *
 * @package axmls
 */
index f5c7192..6e9ff35 100644 (file)
@@ -10,9 +10,9 @@
  * build a database on any ADOdb-supported platform using a simple
  * XML schema.
  *
- * Last Editor: $Author$
+ * Last Editor: $Author: jlim $
  * @author Richard Tango-Lowy & Dan Cech
- * @version $Revision$
+ * @version $Revision: 1.62 $
  *
  * @package axmls
  * @tutorial getting_started.pkg
@@ -1310,7 +1310,7 @@ class dbQuerySet extends dbObject {
 * @tutorial getting_started.pkg
 *
 * @author Richard Tango-Lowy & Dan Cech
-* @version $Revision$
+* @version $Revision: 1.62 $
 *
 * @package axmls
 */
index 2da3777..e3c4876 100644 (file)
@@ -14,7 +14,7 @@
 /**
        \mainpage
        
-        @version V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+        @version V5.14 8 Sept 2011   (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
 
        Released under both BSD license and Lesser GPL library license. You can choose which license
        you prefer.
                /**
                 * ADODB version as a string.
                 */
-               $ADODB_vers = 'V5.11 5 May 2010  (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.';
+               $ADODB_vers = 'V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.';
        
                /**
                 * Determines whether recordset->RecordCount() is used. 
                        $element0 = reset($inputarr);
                        # is_object check because oci8 descriptors can be passed in
                        $array_2d = $this->bulkBind && is_array($element0) && !is_object(reset($element0));
+               
                        //remove extra memory copy of input -mikefedyk
                        unset($element0);
                        
                                $sqlarr = explode('?',$sql);
                                $nparams = sizeof($sqlarr)-1;
                                if (!$array_2d) $inputarr = array($inputarr);
+       
                                foreach($inputarr as $arr) {
                                        $sql = ''; $i = 0;
                                        //Use each() instead of foreach to reduce memory usage -mikefedyk
                                                $stmt = $this->Prepare($sql);
                                        else
                                                $stmt = $sql;
-                                               
+                                       
                                        foreach($inputarr as $arr) {
                                                $ret = $this->_Execute($stmt,$arr);
                                                if (!$ret) return $ret;
                                if (get_magic_quotes_runtime() && !$this->memCache) {
                                        ADOConnection::outp("Please disable magic_quotes_runtime - it corrupts cache files :(");
                                }
-                               if ($this->debug !== -1) ADOConnection::outp( " $md5file cache failure: $err (see sql below)");
+                               if ($this->debug !== -1) ADOConnection::outp( " $md5file cache failure: $err (this is a notice and not an error)");
                        }
                        
                        $rs = $this->Execute($sqlparam,$inputarr);
@@ -4153,7 +4155,7 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
                                $fakedsn = str_replace('@/','@adodb-fakehost/',$fakedsn);
                        }
                        
-                        if ((strpos($origdsn, 'sqlite')) !== FALSE) {
+                        if ((strpos($origdsn, 'sqlite')) !== FALSE && stripos($origdsn, '%2F') === FALSE) {
              // special handling for SQLite, it only might have the path to the database file.
              // If you try to connect to a SQLite database using a dsn like 'sqlite:///path/to/database', the 'parse_url' php function
              // will throw you an exception with a message such as "unable to parse url"
@@ -4413,4 +4415,4 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
 
 
 }
-?>
\ No newline at end of file
+?>
diff --git a/lib/adodb/datadict/datadict-access.inc.php b/lib/adodb/datadict/datadict-access.inc.php
deleted file mode 100644 (file)
index 294b8ae..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_access extends ADODB_DataDict {
-       
-       var $databaseType = 'access';
-       var $seqField = false;
-       
-       
-       function ActualType($meta)
-       {
-               switch($meta) {
-               case 'C': return 'TEXT';
-               case 'XL':
-               case 'X': return 'MEMO'; 
-               
-               case 'C2': return 'TEXT'; // up to 32K
-               case 'X2': return 'MEMO';
-               
-               case 'B': return 'BINARY';
-               
-               case 'TS':
-               case 'D': return 'DATETIME';
-               case 'T': return 'DATETIME';
-               
-               case 'L': return 'BYTE';
-               case 'I': return 'INTEGER';
-               case 'I1': return 'BYTE';
-               case 'I2': return 'SMALLINT';
-               case 'I4': return 'INTEGER';
-               case 'I8': return 'INTEGER';
-               
-               case 'F': return 'DOUBLE';
-               case 'N': return 'NUMERIC';
-               default:
-                       return $meta;
-               }
-       }
-       
-       // return string must begin with space
-       function _CreateSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
-       {
-               if ($fautoinc) {
-                       $ftype = 'COUNTER';
-                       return '';
-               }
-               if (substr($ftype,0,7) == 'DECIMAL') $ftype = 'DECIMAL';
-               $suffix = '';
-               if (strlen($fdefault)) {
-                       //$suffix .= " DEFAULT $fdefault";
-                       if ($this->debug) ADOConnection::outp("Warning: Access does not supported DEFAULT values (field $fname)");
-               }
-               if ($fnotnull) $suffix .= ' NOT NULL';
-               if ($fconstraint) $suffix .= ' '.$fconstraint;
-               return $suffix;
-       }
-       
-       function CreateDatabase($dbname,$options=false)
-       {
-               return array();
-       }
-       
-       
-       function SetSchema($schema)
-       {
-       }
-
-       function AlterColumnSQL($tabname, $flds)
-       {
-               if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
-               return array();
-       }
-       
-       
-       function DropColumnSQL($tabname, $flds)
-       {
-               if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
-               return array();
-       }
-       
-}
-
-
-?>
\ No newline at end of file
diff --git a/lib/adodb/datadict/datadict-db2.inc.php b/lib/adodb/datadict/datadict-db2.inc.php
deleted file mode 100644 (file)
index 2aec30f..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-*/
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_db2 extends ADODB_DataDict {
-       
-       var $databaseType = 'db2';
-       var $seqField = false;
-       
-       function ActualType($meta)
-       {
-               switch($meta) {
-               case 'C': return 'VARCHAR';
-               case 'XL': return 'CLOB';
-               case 'X': return 'VARCHAR(3600)'; 
-
-               case 'C2': return 'VARCHAR'; // up to 32K
-               case 'X2': return 'VARCHAR(3600)'; // up to 32000, but default page size too small
-
-               case 'B': return 'BLOB';
-
-               case 'D': return 'DATE';
-               case 'TS':
-               case 'T': return 'TIMESTAMP';
-
-               case 'L': return 'SMALLINT';
-               case 'I': return 'INTEGER';
-               case 'I1': return 'SMALLINT';
-               case 'I2': return 'SMALLINT';
-               case 'I4': return 'INTEGER';
-               case 'I8': return 'BIGINT';
-
-               case 'F': return 'DOUBLE';
-               case 'N': return 'DECIMAL';
-               default:
-                       return $meta;
-               }
-       }
-       
-       // return string must begin with space
-       function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
-       {       
-               $suffix = '';
-               if ($fautoinc) return ' GENERATED ALWAYS AS IDENTITY'; # as identity start with 
-               if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
-               if ($fnotnull) $suffix .= ' NOT NULL';
-               if ($fconstraint) $suffix .= ' '.$fconstraint;
-               return $suffix;
-       }
-
-       function AlterColumnSQL($tabname, $flds)
-       {
-               if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
-               return array();
-       }
-       
-       
-       function DropColumnSQL($tabname, $flds)
-       {
-               if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
-               return array();
-       }
-       
-       
-       function ChangeTableSQL($tablename, $flds, $tableoptions = false)
-       {
-               
-               /**
-                 Allow basic table changes to DB2 databases
-                 DB2 will fatally reject changes to non character columns 
-
-               */
-               
-               $validTypes = array("CHAR","VARC");
-               $invalidTypes = array("BIGI","BLOB","CLOB","DATE", "DECI","DOUB", "INTE", "REAL","SMAL", "TIME");
-               // check table exists
-               $cols = $this->MetaColumns($tablename);
-               if ( empty($cols)) { 
-                       return $this->CreateTableSQL($tablename, $flds, $tableoptions);
-               }
-               
-               // already exists, alter table instead
-               list($lines,$pkey) = $this->_GenFields($flds);
-               $alter = 'ALTER TABLE ' . $this->TableName($tablename);
-               $sql = array();
-               
-               foreach ( $lines as $id => $v ) {
-                       if ( isset($cols[$id]) && is_object($cols[$id]) ) {
-                               /**
-                                 If the first field of $v is the fieldname, and
-                                 the second is the field type/size, we assume its an
-                                 attempt to modify the column size, so check that it is allowed
-                                 $v can have an indeterminate number of blanks between the
-                                 fields, so account for that too
-                                */
-                               $vargs = explode(' ' , $v);
-                               // assume that $vargs[0] is the field name.
-                               $i=0;
-                               // Find the next non-blank value;
-                               for ($i=1;$i<sizeof($vargs);$i++)
-                                       if ($vargs[$i] != '')
-                                               break;
-                               
-                               // if $vargs[$i] is one of the following, we are trying to change the
-                               // size of the field, if not allowed, simply ignore the request.
-                               if (in_array(substr($vargs[$i],0,4),$invalidTypes)) 
-                                       continue;
-                               // insert the appropriate DB2 syntax
-                               if (in_array(substr($vargs[$i],0,4),$validTypes)) {
-                                       array_splice($vargs,$i,0,array('SET','DATA','TYPE'));
-                               }
-
-                               // Now Look for the NOT NULL statement as this is not allowed in
-                               // the ALTER table statement. If it is in there, remove it
-                               if (in_array('NOT',$vargs) && in_array('NULL',$vargs)) {
-                                       for ($i=1;$i<sizeof($vargs);$i++)
-                                       if ($vargs[$i] == 'NOT')
-                                               break;
-                                       array_splice($vargs,$i,2,'');
-                               }
-                               $v = implode(' ',$vargs);       
-                               $sql[] = $alter . $this->alterCol . ' ' . $v;
-                       } else {
-                               $sql[] = $alter . $this->addCol . ' ' . $v;
-                       }
-               }
-               
-               return $sql;
-       }
-       
-}
-
-
-?>
\ No newline at end of file
diff --git a/lib/adodb/datadict/datadict-firebird.inc.php b/lib/adodb/datadict/datadict-firebird.inc.php
deleted file mode 100644 (file)
index 1f1d252..0000000
+++ /dev/null
@@ -1,152 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-*/
-
-class ADODB2_firebird extends ADODB_DataDict {
-       
-       var $databaseType = 'firebird';
-       var $seqField = false;
-       var $seqPrefix = 'gen_';
-       var $blobSize = 40000;  
-       
-       function ActualType($meta)
-       {
-               switch($meta) {
-               case 'C': return 'VARCHAR';
-               case 'XL': return 'VARCHAR(32000)'; 
-               case 'X': return 'VARCHAR(4000)'; 
-               
-               case 'C2': return 'VARCHAR'; // up to 32K
-               case 'X2': return 'VARCHAR(4000)';
-               
-               case 'B': return 'BLOB';
-                       
-               case 'D': return 'DATE';
-               case 'TS':
-               case 'T': return 'TIMESTAMP';
-               
-               case 'L': return 'SMALLINT';
-               case 'I': return 'INTEGER';
-               case 'I1': return 'SMALLINT';
-               case 'I2': return 'SMALLINT';
-               case 'I4': return 'INTEGER';
-               case 'I8': return 'INTEGER';
-               
-               case 'F': return 'DOUBLE PRECISION';
-               case 'N': return 'DECIMAL';
-               default:
-                       return $meta;
-               }
-       }
-       
-       function NameQuote($name = NULL)
-       {
-               if (!is_string($name)) {
-                       return FALSE;
-               }
-               
-               $name = trim($name);
-               
-               if ( !is_object($this->connection) ) {
-                       return $name;
-               }
-               
-               $quote = $this->connection->nameQuote;
-               
-               // if name is of the form `name`, quote it
-               if ( preg_match('/^`(.+)`$/', $name, $matches) ) {
-                       return $quote . $matches[1] . $quote;
-               }
-               
-               // if name contains special characters, quote it
-               if ( !preg_match('/^[' . $this->nameRegex . ']+$/', $name) ) {
-                       return $quote . $name . $quote;
-               }
-               
-               return $quote . $name . $quote;
-       }
-
-       function CreateDatabase($dbname, $options=false)
-       {
-               $options = $this->_Options($options);
-               $sql = array();
-               
-               $sql[] = "DECLARE EXTERNAL FUNCTION LOWER CSTRING(80) RETURNS CSTRING(80) FREE_IT ENTRY_POINT 'IB_UDF_lower' MODULE_NAME 'ib_udf'";
-               
-               return $sql;
-       }
-       
-       function _DropAutoIncrement($t)
-       {
-               if (strpos($t,'.') !== false) {
-                       $tarr = explode('.',$t);
-                       return 'DROP GENERATOR '.$tarr[0].'."gen_'.$tarr[1].'"';
-               }
-               return 'DROP GENERATOR "GEN_'.$t;
-       }
-       
-
-       function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
-       {
-               $suffix = '';
-               
-               if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
-               if ($fnotnull) $suffix .= ' NOT NULL';
-               if ($fautoinc) $this->seqField = $fname;
-               if ($fconstraint) $suffix .= ' '.$fconstraint;
-               
-               return $suffix;
-       }
-       
-/*
-CREATE or replace TRIGGER jaddress_insert
-before insert on jaddress
-for each row
-begin
-IF ( NEW."seqField" IS NULL OR NEW."seqField" = 0 ) THEN
-  NEW."seqField" = GEN_ID("GEN_tabname", 1);
-end;
-*/
-       function _Triggers($tabname,$tableoptions)
-       {       
-               if (!$this->seqField) return array();
-               
-               $tab1 = preg_replace( '/"/', '', $tabname );
-               if ($this->schema) {
-                       $t = strpos($tab1,'.');
-                       if ($t !== false) $tab = substr($tab1,$t+1);
-                       else $tab = $tab1;
-                       $seqField = $this->seqField;
-                       $seqname = $this->schema.'.'.$this->seqPrefix.$tab;
-                       $trigname = $this->schema.'.trig_'.$this->seqPrefix.$tab;
-               } else {
-                       $seqField = $this->seqField;
-                       $seqname = $this->seqPrefix.$tab1;
-                       $trigname = 'trig_'.$seqname;
-               }
-               if (isset($tableoptions['REPLACE']))
-               { $sql[] = "DROP GENERATOR \"$seqname\"";
-                 $sql[] = "CREATE GENERATOR \"$seqname\"";
-                 $sql[] = "ALTER TRIGGER \"$trigname\" BEFORE INSERT OR UPDATE AS BEGIN IF ( NEW.$seqField IS NULL OR NEW.$seqField = 0 ) THEN NEW.$seqField = GEN_ID(\"$seqname\", 1); END";
-               }
-               else
-               { $sql[] = "CREATE GENERATOR \"$seqname\"";
-                 $sql[] = "CREATE TRIGGER \"$trigname\" FOR $tabname BEFORE INSERT OR UPDATE AS BEGIN IF ( NEW.$seqField IS NULL OR NEW.$seqField = 0 ) THEN NEW.$seqField = GEN_ID(\"$seqname\", 1); END";
-               }
-               
-               $this->seqField = false;
-               return $sql;
-       }
-
-}
-
-
-?>
\ No newline at end of file
diff --git a/lib/adodb/datadict/datadict-generic.inc.php b/lib/adodb/datadict/datadict-generic.inc.php
deleted file mode 100644 (file)
index b6e10ab..0000000
+++ /dev/null
@@ -1,126 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_generic extends ADODB_DataDict {
-       
-       var $databaseType = 'generic';
-       var $seqField = false;
-       
-       
-       function ActualType($meta)
-       {
-               switch($meta) {
-               case 'C': return 'VARCHAR';
-               case 'XL':
-               case 'X': return 'VARCHAR(250)';
-               
-               case 'C2': return 'VARCHAR';
-               case 'X2': return 'VARCHAR(250)';
-               
-               case 'B': return 'VARCHAR';
-                       
-               case 'D': return 'DATE';
-               case 'TS':
-               case 'T': return 'DATE';
-               
-               case 'L': return 'DECIMAL(1)';
-               case 'I': return 'DECIMAL(10)';
-               case 'I1': return 'DECIMAL(3)';
-               case 'I2': return 'DECIMAL(5)';
-               case 'I4': return 'DECIMAL(10)';
-               case 'I8': return 'DECIMAL(20)';
-               
-               case 'F': return 'DECIMAL(32,8)';
-               case 'N': return 'DECIMAL';
-               default:
-                       return $meta;
-               }
-       }
-
-       function AlterColumnSQL($tabname, $flds)
-       {
-               if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
-               return array();
-       }
-       
-       
-       function DropColumnSQL($tabname, $flds)
-       {
-               if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
-               return array();
-       }
-       
-}
-
-/*
-//db2
-       function ActualType($meta)
-       {
-               switch($meta) {
-               case 'C': return 'VARCHAR';
-               case 'X': return 'VARCHAR'; 
-               
-               case 'C2': return 'VARCHAR'; // up to 32K
-               case 'X2': return 'VARCHAR';
-               
-               case 'B': return 'BLOB';
-                       
-               case 'D': return 'DATE';
-               case 'T': return 'TIMESTAMP';
-               
-               case 'L': return 'SMALLINT';
-               case 'I': return 'INTEGER';
-               case 'I1': return 'SMALLINT';
-               case 'I2': return 'SMALLINT';
-               case 'I4': return 'INTEGER';
-               case 'I8': return 'BIGINT';
-               
-               case 'F': return 'DOUBLE';
-               case 'N': return 'DECIMAL';
-               default:
-                       return $meta;
-               }
-       }
-       
-// ifx
-function ActualType($meta)
-       {
-               switch($meta) {
-               case 'C': return 'VARCHAR';// 255
-               case 'X': return 'TEXT'; 
-               
-               case 'C2': return 'NVARCHAR';
-               case 'X2': return 'TEXT';
-               
-               case 'B': return 'BLOB';
-                       
-               case 'D': return 'DATE';
-               case 'T': return 'DATETIME';
-               
-               case 'L': return 'SMALLINT';
-               case 'I': return 'INTEGER';
-               case 'I1': return 'SMALLINT';
-               case 'I2': return 'SMALLINT';
-               case 'I4': return 'INTEGER';
-               case 'I8': return 'DECIMAL(20)';
-               
-               case 'F': return 'FLOAT';
-               case 'N': return 'DECIMAL';
-               default:
-                       return $meta;
-               }
-       }
-*/
-?>
\ No newline at end of file
diff --git a/lib/adodb/datadict/datadict-ibase.inc.php b/lib/adodb/datadict/datadict-ibase.inc.php
deleted file mode 100644 (file)
index e86b4a5..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_ibase extends ADODB_DataDict {
-       
-       var $databaseType = 'ibase';
-       var $seqField = false;
-       
-       
-       function ActualType($meta)
-       {
-               switch($meta) {
-               case 'C': return 'VARCHAR';
-               case 'XL':
-               case 'X': return 'VARCHAR(4000)'; 
-               
-               case 'C2': return 'VARCHAR'; // up to 32K
-               case 'X2': return 'VARCHAR(4000)';
-               
-               case 'B': return 'BLOB';
-                       
-               case 'D': return 'DATE';
-               case 'TS':
-               case 'T': return 'TIMESTAMP';
-               
-               case 'L': return 'SMALLINT';
-               case 'I': return 'INTEGER';
-               case 'I1': return 'SMALLINT';
-               case 'I2': return 'SMALLINT';
-               case 'I4': return 'INTEGER';
-               case 'I8': return 'INTEGER';
-               
-               case 'F': return 'DOUBLE PRECISION';
-               case 'N': return 'DECIMAL';
-               default:
-                       return $meta;
-               }
-       }
-
-       function AlterColumnSQL($tabname, $flds)
-       {
-               if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
-               return array();
-       }
-       
-       
-       function DropColumnSQL($tabname, $flds)
-       {
-               if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
-               return array();
-       }
-       
-}
-
-
-?>
\ No newline at end of file
diff --git a/lib/adodb/datadict/datadict-informix.inc.php b/lib/adodb/datadict/datadict-informix.inc.php
deleted file mode 100644 (file)
index 4ab60d3..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_informix extends ADODB_DataDict {
-       
-       var $databaseType = 'informix';
-       var $seqField = false;
-       
-       
-       function ActualType($meta)
-       {
-               switch($meta) {
-               case 'C': return 'VARCHAR';// 255
-               case 'XL':
-               case 'X': return 'TEXT'; 
-               
-               case 'C2': return 'NVARCHAR';
-               case 'X2': return 'TEXT';
-               
-               case 'B': return 'BLOB';
-                       
-               case 'D': return 'DATE';
-               case 'TS':
-               case 'T': return 'DATETIME YEAR TO SECOND';
-               
-               case 'L': return 'SMALLINT';
-               case 'I': return 'INTEGER';
-               case 'I1': return 'SMALLINT';
-               case 'I2': return 'SMALLINT';
-               case 'I4': return 'INTEGER';
-               case 'I8': return 'DECIMAL(20)';
-               
-               case 'F': return 'FLOAT';
-               case 'N': return 'DECIMAL';
-               default:
-                       return $meta;
-               }
-       }
-
-       function AlterColumnSQL($tabname, $flds)
-       {
-               if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported");
-               return array();
-       }
-       
-       
-       function DropColumnSQL($tabname, $flds)
-       {
-               if ($this->debug) ADOConnection::outp("DropColumnSQL not supported");
-               return array();
-       }
-       
-       // return string must begin with space
-       function _CreateSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
-       {
-               if ($fautoinc) {
-                       $ftype = 'SERIAL';
-                       return '';
-               }
-               $suffix = '';
-               if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
-               if ($fnotnull) $suffix .= ' NOT NULL';
-               if ($fconstraint) $suffix .= ' '.$fconstraint;
-               return $suffix;
-       }
-       
-}
-
-?>
\ No newline at end of file
diff --git a/lib/adodb/datadict/datadict-mssql.inc.php b/lib/adodb/datadict/datadict-mssql.inc.php
deleted file mode 100644 (file)
index b35284f..0000000
+++ /dev/null
@@ -1,284 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-*/
-
-/*
-In ADOdb, named quotes for MS SQL Server use ". From the MSSQL Docs:
-
-       Note Delimiters are for identifiers only. Delimiters cannot be used for keywords, 
-       whether or not they are marked as reserved in SQL Server.
-       
-       Quoted identifiers are delimited by double quotation marks ("):
-       SELECT * FROM "Blanks in Table Name"
-       
-       Bracketed identifiers are delimited by brackets ([ ]):
-       SELECT * FROM [Blanks In Table Name]
-       
-       Quoted identifiers are valid only when the QUOTED_IDENTIFIER option is set to ON. By default, 
-       the Microsoft OLE DB Provider for SQL Server and SQL Server ODBC driver set QUOTED_IDENTIFIER ON 
-       when they connect. 
-       
-       In Transact-SQL, the option can be set at various levels using SET QUOTED_IDENTIFIER, 
-       the quoted identifier option of sp_dboption, or the user options option of sp_configure.
-       
-       When SET ANSI_DEFAULTS is ON, SET QUOTED_IDENTIFIER is enabled.
-       
-       Syntax
-       
-               SET QUOTED_IDENTIFIER { ON | OFF }
-
-
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_mssql extends ADODB_DataDict {
-       var $databaseType = 'mssql';
-       var $dropIndex = 'DROP INDEX %2$s.%1$s';
-       var $renameTable = "EXEC sp_rename '%s','%s'";
-       var $renameColumn = "EXEC sp_rename '%s.%s','%s'";
-
-       var $typeX = 'TEXT';  ## Alternatively, set it to VARCHAR(4000)
-       var $typeXL = 'TEXT';
-       
-       //var $alterCol = ' ALTER COLUMN ';
-       
-       function MetaType($t,$len=-1,$fieldobj=false)
-       {
-               if (is_object($t)) {
-                       $fieldobj = $t;
-                       $t = $fieldobj->type;
-                       $len = $fieldobj->max_length;
-               }
-               
-               $len = -1; // mysql max_length is not accurate
-               switch (strtoupper($t)) {
-               case 'R':
-               case 'INT': 
-               case 'INTEGER': return  'I';
-               case 'BIT':
-               case 'TINYINT': return  'I1';
-               case 'SMALLINT': return 'I2';
-               case 'BIGINT':  return  'I8';
-               case 'SMALLDATETIME': return 'T';
-               case 'REAL':
-               case 'FLOAT': return 'F';
-               default: return parent::MetaType($t,$len,$fieldobj);
-               }
-       }
-       
-       function ActualType($meta)
-       {
-               switch(strtoupper($meta)) {
-
-               case 'C': return 'VARCHAR';
-               case 'XL': return (isset($this)) ? $this->typeXL : 'TEXT';
-               case 'X': return (isset($this)) ? $this->typeX : 'TEXT'; ## could be varchar(8000), but we want compat with oracle
-               case 'C2': return 'NVARCHAR';
-               case 'X2': return 'NTEXT';
-               
-               case 'B': return 'IMAGE';
-                       
-               case 'D': return 'DATETIME';
-               
-               case 'TS':
-               case 'T': return 'DATETIME';
-               case 'L': return 'BIT';
-               
-               case 'R':               
-               case 'I': return 'INT'; 
-               case 'I1': return 'TINYINT';
-               case 'I2': return 'SMALLINT';
-               case 'I4': return 'INT';
-               case 'I8': return 'BIGINT';
-               
-               case 'F': return 'REAL';
-               case 'N': return 'NUMERIC';
-               default:
-                       return $meta;
-               }
-       }
-       
-       
-       function AddColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName ($tabname);
-               $f = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               $s = "ALTER TABLE $tabname $this->addCol";
-               foreach($lines as $v) {
-                       $f[] = "\n $v";
-               }
-               $s .= implode(', ',$f);
-               $sql[] = $s;
-               return $sql;
-       }
-       
-       /*
-       function AlterColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName ($tabname);
-               $sql = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               foreach($lines as $v) {
-                       $sql[] = "ALTER TABLE $tabname $this->alterCol $v";
-               }
-
-               return $sql;
-       }
-       */
-       
-       function DropColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName ($tabname);
-               if (!is_array($flds))
-                       $flds = explode(',',$flds);
-               $f = array();
-               $s = 'ALTER TABLE ' . $tabname;
-               foreach($flds as $v) {
-                       $f[] = "\n$this->dropCol ".$this->NameQuote($v);
-               }
-               $s .= implode(', ',$f);
-               $sql[] = $s;
-               return $sql;
-       }
-       
-       // return string must begin with space
-       function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
-       {       
-               $suffix = '';
-               if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
-               if ($fautoinc) $suffix .= ' IDENTITY(1,1)';
-               if ($fnotnull) $suffix .= ' NOT NULL';
-               else if ($suffix == '') $suffix .= ' NULL';
-               if ($fconstraint) $suffix .= ' '.$fconstraint;
-               return $suffix;
-       }
-       
-       /*
-CREATE TABLE 
-    [ database_name.[ owner ] . | owner. ] table_name 
-    ( { < column_definition > 
-        | column_name AS computed_column_expression 
-        | < table_constraint > ::= [ CONSTRAINT constraint_name ] }
-
-            | [ { PRIMARY KEY | UNIQUE } [ ,...n ] 
-    ) 
-
-[ ON { filegroup | DEFAULT } ] 
-[ TEXTIMAGE_ON { filegroup | DEFAULT } ] 
-
-< column_definition > ::= { column_name data_type } 
-    [ COLLATE < collation_name > ] 
-    [ [ DEFAULT constant_expression ] 
-        | [ IDENTITY [ ( seed , increment ) [ NOT FOR REPLICATION ] ] ]
-    ] 
-    [ ROWGUIDCOL] 
-    [ < column_constraint > ] [ ...n ] 
-
-< column_constraint > ::= [ CONSTRAINT constraint_name ] 
-    { [ NULL | NOT NULL ] 
-        | [ { PRIMARY KEY | UNIQUE } 
-            [ CLUSTERED | NONCLUSTERED ] 
-            [ WITH FILLFACTOR = fillfactor ] 
-            [ON {filegroup | DEFAULT} ] ] 
-        ] 
-        | [ [ FOREIGN KEY ] 
-            REFERENCES ref_table [ ( ref_column ) ] 
-            [ ON DELETE { CASCADE | NO ACTION } ] 
-            [ ON UPDATE { CASCADE | NO ACTION } ] 
-            [ NOT FOR REPLICATION ] 
-        ] 
-        | CHECK [ NOT FOR REPLICATION ] 
-        ( logical_expression ) 
-    } 
-
-< table_constraint > ::= [ CONSTRAINT constraint_name ] 
-    { [ { PRIMARY KEY | UNIQUE } 
-        [ CLUSTERED | NONCLUSTERED ] 
-        { ( column [ ASC | DESC ] [ ,...n ] ) } 
-        [ WITH FILLFACTOR = fillfactor ] 
-        [ ON { filegroup | DEFAULT } ] 
-    ] 
-    | FOREIGN KEY 
-        [ ( column [ ,...n ] ) ] 
-        REFERENCES ref_table [ ( ref_column [ ,...n ] ) ] 
-        [ ON DELETE { CASCADE | NO ACTION } ] 
-        [ ON UPDATE { CASCADE | NO ACTION } ] 
-        [ NOT FOR REPLICATION ] 
-    | CHECK [ NOT FOR REPLICATION ] 
-        ( search_conditions ) 
-    } 
-
-
-       */
-       
-       /*
-       CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ] INDEX index_name 
-    ON { table | view } ( column [ ASC | DESC ] [ ,...n ] ) 
-               [ WITH < index_option > [ ,...n] ] 
-               [ ON filegroup ]
-               < index_option > :: = 
-                   { PAD_INDEX | 
-                       FILLFACTOR = fillfactor | 
-                       IGNORE_DUP_KEY | 
-                       DROP_EXISTING | 
-                   STATISTICS_NORECOMPUTE | 
-                   SORT_IN_TEMPDB  
-               }
-*/
-       function _IndexSQL($idxname, $tabname, $flds, $idxoptions)
-       {
-               $sql = array();
-               
-               if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
-                       $sql[] = sprintf ($this->dropIndex, $idxname, $tabname);
-                       if ( isset($idxoptions['DROP']) )
-                               return $sql;
-               }
-               
-               if ( empty ($flds) ) {
-                       return $sql;
-               }
-               
-               $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : '';
-               $clustered = isset($idxoptions['CLUSTERED']) ? ' CLUSTERED' : '';
-               
-               if ( is_array($flds) )
-                       $flds = implode(', ',$flds);
-               $s = 'CREATE' . $unique . $clustered . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')';
-               
-               if ( isset($idxoptions[$this->upperName]) )
-                       $s .= $idxoptions[$this->upperName];
-               
-
-               $sql[] = $s;
-               
-               return $sql;
-       }
-       
-       
-       function _GetSize($ftype, $ty, $fsize, $fprec)
-       {
-               switch ($ftype) {
-               case 'INT':
-               case 'SMALLINT':
-               case 'TINYINT':
-               case 'BIGINT':
-                       return $ftype;
-               }
-       if ($ty == 'T') return $ftype;
-       return parent::_GetSize($ftype, $ty, $fsize, $fprec);    
-
-       }
-}
-?>
\ No newline at end of file
diff --git a/lib/adodb/datadict/datadict-mssqlnative.inc.php b/lib/adodb/datadict/datadict-mssqlnative.inc.php
deleted file mode 100644 (file)
index 8e43420..0000000
+++ /dev/null
@@ -1,282 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-*/
-
-/*
-In ADOdb, named quotes for MS SQL Server use ". From the MSSQL Docs:
-
-       Note Delimiters are for identifiers only. Delimiters cannot be used for keywords, 
-       whether or not they are marked as reserved in SQL Server.
-       
-       Quoted identifiers are delimited by double quotation marks ("):
-       SELECT * FROM "Blanks in Table Name"
-       
-       Bracketed identifiers are delimited by brackets ([ ]):
-       SELECT * FROM [Blanks In Table Name]
-       
-       Quoted identifiers are valid only when the QUOTED_IDENTIFIER option is set to ON. By default, 
-       the Microsoft OLE DB Provider for SQL Server and SQL Server ODBC driver set QUOTED_IDENTIFIER ON 
-       when they connect. 
-       
-       In Transact-SQL, the option can be set at various levels using SET QUOTED_IDENTIFIER, 
-       the quoted identifier option of sp_dboption, or the user options option of sp_configure.
-       
-       When SET ANSI_DEFAULTS is ON, SET QUOTED_IDENTIFIER is enabled.
-       
-       Syntax
-       
-               SET QUOTED_IDENTIFIER { ON | OFF }
-
-
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_mssqlnative extends ADODB_DataDict {
-       var $databaseType = 'mssqlnative';
-       var $dropIndex = 'DROP INDEX %2$s.%1$s';
-       var $renameTable = "EXEC sp_rename '%s','%s'";
-       var $renameColumn = "EXEC sp_rename '%s.%s','%s'";
-
-       var $typeX = 'TEXT';  ## Alternatively, set it to VARCHAR(4000)
-       var $typeXL = 'TEXT';
-       
-       //var $alterCol = ' ALTER COLUMN ';
-       
-       function MetaType($t,$len=-1,$fieldobj=false)
-       {
-               if (is_object($t)) {
-                       $fieldobj = $t;
-                       $t = $fieldobj->type;
-                       $len = $fieldobj->max_length;
-               }
-               
-               $len = -1; // mysql max_length is not accurate
-               switch (strtoupper($t)) {
-               case 'R':
-               case 'INT': 
-               case 'INTEGER': return  'I';
-               case 'BIT':
-               case 'TINYINT': return  'I1';
-               case 'SMALLINT': return 'I2';
-               case 'BIGINT':  return  'I8';
-               
-               case 'REAL':
-               case 'FLOAT': return 'F';
-               default: return parent::MetaType($t,$len,$fieldobj);
-               }
-       }
-       
-       function ActualType($meta)
-       {
-               switch(strtoupper($meta)) {
-
-               case 'C': return 'VARCHAR';
-               case 'XL': return (isset($this)) ? $this->typeXL : 'TEXT';
-               case 'X': return (isset($this)) ? $this->typeX : 'TEXT'; ## could be varchar(8000), but we want compat with oracle
-               case 'C2': return 'NVARCHAR';
-               case 'X2': return 'NTEXT';
-               
-               case 'B': return 'IMAGE';
-                       
-               case 'D': return 'DATETIME';
-               case 'T': return 'DATETIME';
-               case 'L': return 'BIT';
-               
-               case 'R':               
-               case 'I': return 'INT'; 
-               case 'I1': return 'TINYINT';
-               case 'I2': return 'SMALLINT';
-               case 'I4': return 'INT';
-               case 'I8': return 'BIGINT';
-               
-               case 'F': return 'REAL';
-               case 'N': return 'NUMERIC';
-               default:
-                       return $meta;
-               }
-       }
-       
-       
-       function AddColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName ($tabname);
-               $f = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               $s = "ALTER TABLE $tabname $this->addCol";
-               foreach($lines as $v) {
-                       $f[] = "\n $v";
-               }
-               $s .= implode(', ',$f);
-               $sql[] = $s;
-               return $sql;
-       }
-       
-       /*
-       function AlterColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName ($tabname);
-               $sql = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               foreach($lines as $v) {
-                       $sql[] = "ALTER TABLE $tabname $this->alterCol $v";
-               }
-
-               return $sql;
-       }
-       */
-       
-       function DropColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName ($tabname);
-               if (!is_array($flds))
-                       $flds = explode(',',$flds);
-               $f = array();
-               $s = 'ALTER TABLE ' . $tabname;
-               foreach($flds as $v) {
-                       $f[] = "\n$this->dropCol ".$this->NameQuote($v);
-               }
-               $s .= implode(', ',$f);
-               $sql[] = $s;
-               return $sql;
-       }
-       
-       // return string must begin with space
-       function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
-       {       
-               $suffix = '';
-               if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
-               if ($fautoinc) $suffix .= ' IDENTITY(1,1)';
-               if ($fnotnull) $suffix .= ' NOT NULL';
-               else if ($suffix == '') $suffix .= ' NULL';
-               if ($fconstraint) $suffix .= ' '.$fconstraint;
-               return $suffix;
-       }
-       
-       /*
-CREATE TABLE 
-    [ database_name.[ owner ] . | owner. ] table_name 
-    ( { < column_definition > 
-        | column_name AS computed_column_expression 
-        | < table_constraint > ::= [ CONSTRAINT constraint_name ] }
-
-            | [ { PRIMARY KEY | UNIQUE } [ ,...n ] 
-    ) 
-
-[ ON { filegroup | DEFAULT } ] 
-[ TEXTIMAGE_ON { filegroup | DEFAULT } ] 
-
-< column_definition > ::= { column_name data_type } 
-    [ COLLATE < collation_name > ] 
-    [ [ DEFAULT constant_expression ] 
-        | [ IDENTITY [ ( seed , increment ) [ NOT FOR REPLICATION ] ] ]
-    ] 
-    [ ROWGUIDCOL] 
-    [ < column_constraint > ] [ ...n ] 
-
-< column_constraint > ::= [ CONSTRAINT constraint_name ] 
-    { [ NULL | NOT NULL ] 
-        | [ { PRIMARY KEY | UNIQUE } 
-            [ CLUSTERED | NONCLUSTERED ] 
-            [ WITH FILLFACTOR = fillfactor ] 
-            [ON {filegroup | DEFAULT} ] ] 
-        ] 
-        | [ [ FOREIGN KEY ] 
-            REFERENCES ref_table [ ( ref_column ) ] 
-            [ ON DELETE { CASCADE | NO ACTION } ] 
-            [ ON UPDATE { CASCADE | NO ACTION } ] 
-            [ NOT FOR REPLICATION ] 
-        ] 
-        | CHECK [ NOT FOR REPLICATION ] 
-        ( logical_expression ) 
-    } 
-
-< table_constraint > ::= [ CONSTRAINT constraint_name ] 
-    { [ { PRIMARY KEY | UNIQUE } 
-        [ CLUSTERED | NONCLUSTERED ] 
-        { ( column [ ASC | DESC ] [ ,...n ] ) } 
-        [ WITH FILLFACTOR = fillfactor ] 
-        [ ON { filegroup | DEFAULT } ] 
-    ] 
-    | FOREIGN KEY 
-        [ ( column [ ,...n ] ) ] 
-        REFERENCES ref_table [ ( ref_column [ ,...n ] ) ] 
-        [ ON DELETE { CASCADE | NO ACTION } ] 
-        [ ON UPDATE { CASCADE | NO ACTION } ] 
-        [ NOT FOR REPLICATION ] 
-    | CHECK [ NOT FOR REPLICATION ] 
-        ( search_conditions ) 
-    } 
-
-
-       */
-       
-       /*
-       CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ] INDEX index_name 
-    ON { table | view } ( column [ ASC | DESC ] [ ,...n ] ) 
-               [ WITH < index_option > [ ,...n] ] 
-               [ ON filegroup ]
-               < index_option > :: = 
-                   { PAD_INDEX | 
-                       FILLFACTOR = fillfactor | 
-                       IGNORE_DUP_KEY | 
-                       DROP_EXISTING | 
-                   STATISTICS_NORECOMPUTE | 
-                   SORT_IN_TEMPDB  
-               }
-*/
-       function _IndexSQL($idxname, $tabname, $flds, $idxoptions)
-       {
-               $sql = array();
-               
-               if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
-                       $sql[] = sprintf ($this->dropIndex, $idxname, $tabname);
-                       if ( isset($idxoptions['DROP']) )
-                               return $sql;
-               }
-               
-               if ( empty ($flds) ) {
-                       return $sql;
-               }
-               
-               $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : '';
-               $clustered = isset($idxoptions['CLUSTERED']) ? ' CLUSTERED' : '';
-               
-               if ( is_array($flds) )
-                       $flds = implode(', ',$flds);
-               $s = 'CREATE' . $unique . $clustered . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')';
-               
-               if ( isset($idxoptions[$this->upperName]) )
-                       $s .= $idxoptions[$this->upperName];
-               
-
-               $sql[] = $s;
-               
-               return $sql;
-       }
-       
-       
-       function _GetSize($ftype, $ty, $fsize, $fprec)
-       {
-               switch ($ftype) {
-               case 'INT':
-               case 'SMALLINT':
-               case 'TINYINT':
-               case 'BIGINT':
-                       return $ftype;
-               }
-       if ($ty == 'T') return $ftype;
-       return parent::_GetSize($ftype, $ty, $fsize, $fprec);    
-
-       }
-}
-?>
\ No newline at end of file
diff --git a/lib/adodb/datadict/datadict-mysql.inc.php b/lib/adodb/datadict/datadict-mysql.inc.php
deleted file mode 100644 (file)
index 82b1af6..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_mysql extends ADODB_DataDict {
-       var $databaseType = 'mysql';
-       var $alterCol = ' MODIFY COLUMN';
-       var $alterTableAddIndex = true;
-       var $dropTable = 'DROP TABLE IF EXISTS %s'; // requires mysql 3.22 or later
-       
-       var $dropIndex = 'DROP INDEX %s ON %s';
-       var $renameColumn = 'ALTER TABLE %s CHANGE COLUMN %s %s %s';    // needs column-definition!
-       
-       function MetaType($t,$len=-1,$fieldobj=false)
-       {
-               if (is_object($t)) {
-                       $fieldobj = $t;
-                       $t = $fieldobj->type;
-                       $len = $fieldobj->max_length;
-               }
-               $is_serial = is_object($fieldobj) && $fieldobj->primary_key && $fieldobj->auto_increment;
-               
-               $len = -1; // mysql max_length is not accurate
-               switch (strtoupper($t)) {
-               case 'STRING': 
-               case 'CHAR':
-               case 'VARCHAR': 
-               case 'TINYBLOB': 
-               case 'TINYTEXT': 
-               case 'ENUM': 
-               case 'SET':
-                       if ($len <= $this->blobSize) return 'C';
-                       
-               case 'TEXT':
-               case 'LONGTEXT': 
-               case 'MEDIUMTEXT':
-                       return 'X';
-                       
-               // php_mysql extension always returns 'blob' even if 'text'
-               // so we have to check whether binary...
-               case 'IMAGE':
-               case 'LONGBLOB': 
-               case 'BLOB':
-               case 'MEDIUMBLOB':
-                       return !empty($fieldobj->binary) ? 'B' : 'X';
-                       
-               case 'YEAR':
-               case 'DATE': return 'D';
-               
-               case 'TIME':
-               case 'DATETIME':
-               case 'TIMESTAMP': return 'T';
-               
-               case 'FLOAT':
-               case 'DOUBLE':
-                       return 'F';
-                       
-               case 'INT': 
-               case 'INTEGER': return $is_serial ? 'R' : 'I';
-               case 'TINYINT': return $is_serial ? 'R' : 'I1';
-               case 'SMALLINT': return $is_serial ? 'R' : 'I2';
-               case 'MEDIUMINT': return $is_serial ? 'R' : 'I4';
-               case 'BIGINT':  return $is_serial ? 'R' : 'I8';
-               default: return 'N';
-               }
-       }
-
-       function ActualType($meta)
-       {
-               switch(strtoupper($meta)) {
-               case 'C': return 'VARCHAR';
-               case 'XL':return 'LONGTEXT';
-               case 'X': return 'TEXT';
-               
-               case 'C2': return 'VARCHAR';
-               case 'X2': return 'LONGTEXT';
-               
-               case 'B': return 'LONGBLOB';
-                       
-               case 'D': return 'DATE';
-               case 'TS':
-               case 'T': return 'DATETIME';
-               case 'L': return 'TINYINT';
-               
-               case 'R':
-               case 'I4':
-               case 'I': return 'INTEGER';
-               case 'I1': return 'TINYINT';
-               case 'I2': return 'SMALLINT';
-               case 'I8': return 'BIGINT';
-               
-               case 'F': return 'DOUBLE';
-               case 'N': return 'NUMERIC';
-               default:
-                       return $meta;
-               }
-       }
-       
-       // return string must begin with space
-       function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
-       {       
-               $suffix = '';
-               if ($funsigned) $suffix .= ' UNSIGNED';
-               if ($fnotnull) $suffix .= ' NOT NULL';
-               if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
-               if ($fautoinc) $suffix .= ' AUTO_INCREMENT';
-               if ($fconstraint) $suffix .= ' '.$fconstraint;
-               return $suffix;
-       }
-       
-       /*
-       CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)]
-               [table_options] [select_statement]
-               create_definition:
-               col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT]
-               [PRIMARY KEY] [reference_definition]
-               or PRIMARY KEY (index_col_name,...)
-               or KEY [index_name] (index_col_name,...)
-               or INDEX [index_name] (index_col_name,...)
-               or UNIQUE [INDEX] [index_name] (index_col_name,...)
-               or FULLTEXT [INDEX] [index_name] (index_col_name,...)
-               or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...)
-               [reference_definition]
-               or CHECK (expr)
-       */
-       
-       /*
-       CREATE [UNIQUE|FULLTEXT] INDEX index_name
-               ON tbl_name (col_name[(length)],... )
-       */
-       
-       function _IndexSQL($idxname, $tabname, $flds, $idxoptions)
-       {
-               $sql = array();
-               
-               if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
-                       if ($this->alterTableAddIndex) $sql[] = "ALTER TABLE $tabname DROP INDEX $idxname";
-                       else $sql[] = sprintf($this->dropIndex, $idxname, $tabname);
-
-                       if ( isset($idxoptions['DROP']) )
-                               return $sql;
-               }
-               
-               if ( empty ($flds) ) {
-                       return $sql;
-               }
-               
-               if (isset($idxoptions['FULLTEXT'])) {
-                       $unique = ' FULLTEXT';
-               } elseif (isset($idxoptions['UNIQUE'])) {
-                       $unique = ' UNIQUE';
-               } else {
-                       $unique = '';
-               }
-               
-               if ( is_array($flds) ) $flds = implode(', ',$flds);
-               
-               if ($this->alterTableAddIndex) $s = "ALTER TABLE $tabname ADD $unique INDEX $idxname ";
-               else $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname;
-               
-               $s .= ' (' . $flds . ')';
-               
-               if ( isset($idxoptions[$this->upperName]) )
-                       $s .= $idxoptions[$this->upperName];
-               
-               $sql[] = $s;
-               
-               return $sql;
-       }
-}
-?>
\ No newline at end of file
diff --git a/lib/adodb/datadict/datadict-oci8.inc.php b/lib/adodb/datadict/datadict-oci8.inc.php
deleted file mode 100644 (file)
index 7f6ccc4..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_oci8 extends ADODB_DataDict {
-       
-       var $databaseType = 'oci8';
-       var $seqField = false;
-       var $seqPrefix = 'SEQ_';
-       var $dropTable = "DROP TABLE %s CASCADE CONSTRAINTS";
-       var $trigPrefix = 'TRIG_';
-       var $alterCol = ' MODIFY ';
-       var $typeX = 'VARCHAR(4000)';
-       var $typeXL = 'CLOB';
-       
-       function MetaType($t,$len=-1)
-       {
-               if (is_object($t)) {
-                       $fieldobj = $t;
-                       $t = $fieldobj->type;
-                       $len = $fieldobj->max_length;
-               }
-               switch (strtoupper($t)) {
-               case 'VARCHAR':
-               case 'VARCHAR2':
-               case 'CHAR':
-               case 'VARBINARY':
-               case 'BINARY':
-                       if (isset($this) && $len <= $this->blobSize) return 'C';
-                       return 'X';
-               
-               case 'NCHAR':
-               case 'NVARCHAR2':
-               case 'NVARCHAR':
-                       if (isset($this) && $len <= $this->blobSize) return 'C2';
-                       return 'X2';
-                       
-               case 'NCLOB':
-               case 'CLOB':
-                       return 'XL';
-               
-               case 'LONG RAW':
-               case 'LONG VARBINARY':
-               case 'BLOB':
-                       return 'B';
-               
-               case 'TIMESTAMP':
-                       return 'TS';
-                       
-               case 'DATE': 
-                       return 'T';
-               
-               case 'INT': 
-               case 'SMALLINT':
-               case 'INTEGER': 
-                       return 'I';
-                       
-               default:
-                       return 'N';
-               }
-       }
-       
-       function ActualType($meta)
-       {
-               switch($meta) {
-               case 'C': return 'VARCHAR';
-               case 'X': return $this->typeX;
-               case 'XL': return $this->typeXL;
-               
-               case 'C2': return 'NVARCHAR2';
-               case 'X2': return 'NVARCHAR2(4000)';
-               
-               case 'B': return 'BLOB';
-               
-               case 'TS':
-                               return 'TIMESTAMP';
-                               
-               case 'D': 
-               case 'T': return 'DATE';
-               case 'L': return 'NUMBER(1)';
-               case 'I1': return 'NUMBER(3)';
-               case 'I2': return 'NUMBER(5)';
-               case 'I':
-               case 'I4': return 'NUMBER(10)';
-               
-               case 'I8': return 'NUMBER(20)';
-               case 'F': return 'NUMBER';
-               case 'N': return 'NUMBER';
-               case 'R': return 'NUMBER(20)';
-               default:
-                       return $meta;
-               }       
-       }
-       
-       function CreateDatabase($dbname, $options=false)
-       {
-               $options = $this->_Options($options);
-               $password = isset($options['PASSWORD']) ? $options['PASSWORD'] : 'tiger';
-               $tablespace = isset($options["TABLESPACE"]) ? " DEFAULT TABLESPACE ".$options["TABLESPACE"] : '';
-               $sql[] = "CREATE USER ".$dbname." IDENTIFIED BY ".$password.$tablespace;
-               $sql[] = "GRANT CREATE SESSION, CREATE TABLE,UNLIMITED TABLESPACE,CREATE SEQUENCE TO $dbname";
-               
-               return $sql;
-       }
-       
-       function AddColumnSQL($tabname, $flds)
-       {
-               $f = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               $s = "ALTER TABLE $tabname ADD (";
-               foreach($lines as $v) {
-                       $f[] = "\n $v";
-               }
-               
-               $s .= implode(', ',$f).')';
-               $sql[] = $s;
-               return $sql;
-       }
-       
-       function AlterColumnSQL($tabname, $flds)
-       {
-               $f = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               $s = "ALTER TABLE $tabname MODIFY(";
-               foreach($lines as $v) {
-                       $f[] = "\n $v";
-               }
-               $s .= implode(', ',$f).')';
-               $sql[] = $s;
-               return $sql;
-       }
-       
-       function DropColumnSQL($tabname, $flds)
-       {
-               if (!is_array($flds)) $flds = explode(',',$flds);
-               foreach ($flds as $k => $v) $flds[$k] = $this->NameQuote($v);
-               
-               $sql = array();
-               $s = "ALTER TABLE $tabname DROP(";
-               $s .= implode(', ',$flds).') CASCADE CONSTRAINTS';
-               $sql[] = $s;
-               return $sql;
-       }
-       
-       function _DropAutoIncrement($t)
-       {
-               if (strpos($t,'.') !== false) {
-                       $tarr = explode('.',$t);
-                       return "drop sequence ".$tarr[0].".seq_".$tarr[1];
-               }
-               return "drop sequence seq_".$t;
-       }
-       
-       // return string must begin with space
-       function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
-       {
-               $suffix = '';
-               
-               if ($fdefault == "''" && $fnotnull) {// this is null in oracle
-                       $fnotnull = false;
-                       if ($this->debug) ADOConnection::outp("NOT NULL and DEFAULT='' illegal in Oracle");
-               }
-               
-               if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
-               if ($fnotnull) $suffix .= ' NOT NULL';
-               
-               if ($fautoinc) $this->seqField = $fname;
-               if ($fconstraint) $suffix .= ' '.$fconstraint;
-               
-               return $suffix;
-       }
-       
-/*
-CREATE or replace TRIGGER jaddress_insert
-before insert on jaddress
-for each row
-begin
-select seqaddress.nextval into :new.A_ID from dual;
-end;
-*/
-       function _Triggers($tabname,$tableoptions)
-       {
-               if (!$this->seqField) return array();
-               
-               if ($this->schema) {
-                       $t = strpos($tabname,'.');
-                       if ($t !== false) $tab = substr($tabname,$t+1);
-                       else $tab = $tabname;
-                       $seqname = $this->schema.'.'.$this->seqPrefix.$tab;
-                       $trigname = $this->schema.'.'.$this->trigPrefix.$this->seqPrefix.$tab;
-               } else {
-                       $seqname = $this->seqPrefix.$tabname;
-                       $trigname = $this->trigPrefix.$seqname;
-               }
-               
-               if (strlen($seqname) > 30) {
-                       $seqname = $this->seqPrefix.uniqid('');
-               } // end if
-               if (strlen($trigname) > 30) {
-                       $trigname = $this->trigPrefix.uniqid('');
-               } // end if
-
-               if (isset($tableoptions['REPLACE'])) $sql[] = "DROP SEQUENCE $seqname";
-               $seqCache = '';
-               if (isset($tableoptions['SEQUENCE_CACHE'])){$seqCache = $tableoptions['SEQUENCE_CACHE'];}
-               $seqIncr = '';
-               if (isset($tableoptions['SEQUENCE_INCREMENT'])){$seqIncr = ' INCREMENT BY '.$tableoptions['SEQUENCE_INCREMENT'];}
-               $seqStart = '';
-               if (isset($tableoptions['SEQUENCE_START'])){$seqIncr = ' START WITH '.$tableoptions['SEQUENCE_START'];}
-               $sql[] = "CREATE SEQUENCE $seqname $seqStart $seqIncr $seqCache";
-               $sql[] = "CREATE OR REPLACE TRIGGER $trigname BEFORE insert ON $tabname FOR EACH ROW WHEN (NEW.$this->seqField IS NULL OR NEW.$this->seqField = 0) BEGIN select $seqname.nextval into :new.$this->seqField from dual; END;";
-               
-               $this->seqField = false;
-               return $sql;
-       }
-       
-       /*
-       CREATE [TEMPORARY] TABLE [IF NOT EXISTS] tbl_name [(create_definition,...)]
-               [table_options] [select_statement]
-               create_definition:
-               col_name type [NOT NULL | NULL] [DEFAULT default_value] [AUTO_INCREMENT]
-               [PRIMARY KEY] [reference_definition]
-               or PRIMARY KEY (index_col_name,...)
-               or KEY [index_name] (index_col_name,...)
-               or INDEX [index_name] (index_col_name,...)
-               or UNIQUE [INDEX] [index_name] (index_col_name,...)
-               or FULLTEXT [INDEX] [index_name] (index_col_name,...)
-               or [CONSTRAINT symbol] FOREIGN KEY [index_name] (index_col_name,...)
-               [reference_definition]
-               or CHECK (expr)
-       */
-       
-
-       
-       function _IndexSQL($idxname, $tabname, $flds,$idxoptions)
-       {
-               $sql = array();
-               
-               if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
-                       $sql[] = sprintf ($this->dropIndex, $idxname, $tabname);
-                       if ( isset($idxoptions['DROP']) )
-                               return $sql;
-               }
-               
-               if ( empty ($flds) ) {
-                       return $sql;
-               }
-               
-               if (isset($idxoptions['BITMAP'])) {
-                       $unique = ' BITMAP'; 
-               } elseif (isset($idxoptions['UNIQUE'])) {
-                       $unique = ' UNIQUE';
-               } else {
-                       $unique = '';
-               }
-               
-               if ( is_array($flds) )
-                       $flds = implode(', ',$flds);
-               $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')';
-               
-               if ( isset($idxoptions[$this->upperName]) )
-                       $s .= $idxoptions[$this->upperName];
-               
-               if (isset($idxoptions['oci8']))
-                       $s .= $idxoptions['oci8'];
-               
-
-               $sql[] = $s;
-               
-               return $sql;
-       }
-       
-       function GetCommentSQL($table,$col)
-       {
-               $table = $this->connection->qstr($table);
-               $col = $this->connection->qstr($col);   
-               return "select comments from USER_COL_COMMENTS where TABLE_NAME=$table and COLUMN_NAME=$col";
-       }
-       
-       function SetCommentSQL($table,$col,$cmt)
-       {
-               $cmt = $this->connection->qstr($cmt);
-               return  "COMMENT ON COLUMN $table.$col IS $cmt";
-       }
-}
-?>
\ No newline at end of file
diff --git a/lib/adodb/datadict/datadict-postgres.inc.php b/lib/adodb/datadict/datadict-postgres.inc.php
deleted file mode 100644 (file)
index dfeb98c..0000000
+++ /dev/null
@@ -1,448 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_postgres extends ADODB_DataDict {
-       
-       var $databaseType = 'postgres';
-       var $seqField = false;
-       var $seqPrefix = 'SEQ_';
-       var $addCol = ' ADD COLUMN';
-       var $quote = '"';
-       var $renameTable = 'ALTER TABLE %s RENAME TO %s'; // at least since 7.1
-       var $dropTable = 'DROP TABLE %s CASCADE';
-       
-       function MetaType($t,$len=-1,$fieldobj=false)
-       {
-               if (is_object($t)) {
-                       $fieldobj = $t;
-                       $t = $fieldobj->type;
-                       $len = $fieldobj->max_length;
-               }
-               $is_serial = is_object($fieldobj) && $fieldobj->primary_key && $fieldobj->unique && 
-                       $fieldobj->has_default && substr($fieldobj->default_value,0,8) == 'nextval(';
-               
-               switch (strtoupper($t)) {
-                       case 'INTERVAL':
-                       case 'CHAR':
-                       case 'CHARACTER':
-                       case 'VARCHAR':
-                       case 'NAME':
-                       case 'BPCHAR':
-                               if ($len <= $this->blobSize) return 'C';
-                       
-                       case 'TEXT':
-                               return 'X';
-       
-                       case 'IMAGE': // user defined type
-                       case 'BLOB': // user defined type
-                       case 'BIT':     // This is a bit string, not a single bit, so don't return 'L'
-                       case 'VARBIT':
-                       case 'BYTEA':
-                               return 'B';
-                       
-                       case 'BOOL':
-                       case 'BOOLEAN':
-                               return 'L';
-                       
-                       case 'DATE':
-                               return 'D';
-                       
-                       case 'TIME':
-                       case 'DATETIME':
-                       case 'TIMESTAMP':
-                       case 'TIMESTAMPTZ':
-                               return 'T';
-                       
-                       case 'INTEGER': return !$is_serial ? 'I' : 'R';
-                       case 'SMALLINT': 
-                       case 'INT2': return !$is_serial ? 'I2' : 'R';
-                       case 'INT4': return !$is_serial ? 'I4' : 'R';
-                       case 'BIGINT': 
-                       case 'INT8': return !$is_serial ? 'I8' : 'R';
-                               
-                       case 'OID':
-                       case 'SERIAL':
-                               return 'R';
-                       
-                       case 'FLOAT4':
-                       case 'FLOAT8':
-                       case 'DOUBLE PRECISION':
-                       case 'REAL':
-                               return 'F';
-                               
-                        default:
-                               return 'N';
-               }
-       }
-       
-       function ActualType($meta)
-       {
-               switch($meta) {
-               case 'C': return 'VARCHAR';
-               case 'XL':
-               case 'X': return 'TEXT';
-               
-               case 'C2': return 'VARCHAR';
-               case 'X2': return 'TEXT';
-               
-               case 'B': return 'BYTEA';
-                       
-               case 'D': return 'DATE';
-               case 'TS':
-               case 'T': return 'TIMESTAMP';
-               
-               case 'L': return 'BOOLEAN';
-               case 'I': return 'INTEGER';
-               case 'I1': return 'SMALLINT';
-               case 'I2': return 'INT2';
-               case 'I4': return 'INT4';
-               case 'I8': return 'INT8';
-               
-               case 'F': return 'FLOAT8';
-               case 'N': return 'NUMERIC';
-               default:
-                       return $meta;
-               }
-       }
-       
-       /**
-        * Adding a new Column 
-        *
-        * reimplementation of the default function as postgres does NOT allow to set the default in the same statement
-        *
-        * @param string $tabname table-name
-        * @param string $flds column-names and types for the changed columns
-        * @return array with SQL strings
-        */
-       function AddColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName ($tabname);
-               $sql = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               $alter = 'ALTER TABLE ' . $tabname . $this->addCol . ' ';
-               foreach($lines as $v) {
-                       if (($not_null = preg_match('/NOT NULL/i',$v))) {
-                               $v = preg_replace('/NOT NULL/i','',$v);
-                       }
-                       if (preg_match('/^([^ ]+) .*DEFAULT ([^ ]+)/',$v,$matches)) {
-                               list(,$colname,$default) = $matches;
-                               $sql[] = $alter . str_replace('DEFAULT '.$default,'',$v);
-                               $sql[] = 'UPDATE '.$tabname.' SET '.$colname.'='.$default;
-                               $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET DEFAULT ' . $default;
-                       } else {                                
-                               $sql[] = $alter . $v;
-                       }
-                       if ($not_null) {
-                               list($colname) = explode(' ',$v);
-                               $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET NOT NULL';
-                       }
-               }
-               return $sql;
-       }
-
-
-       function DropIndexSQL ($idxname, $tabname = NULL)
-       {
-          return array(sprintf($this->dropIndex, $this->TableName($idxname), $this->TableName($tabname)));
-       }
-       
-       /**
-        * Change the definition of one column
-        *
-        * Postgres can't do that on it's own, you need to supply the complete defintion of the new table,
-        * to allow, recreating the table and copying the content over to the new table
-        * @param string $tabname table-name
-        * @param string $flds column-name and type for the changed column
-        * @param string $tableflds complete defintion of the new table, eg. for postgres, default ''
-        * @param array/ $tableoptions options for the new table see CreateTableSQL, default ''
-        * @return array with SQL strings
-        */
-        /*
-       function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='')
-       {
-               if (!$tableflds) {
-                       if ($this->debug) ADOConnection::outp("AlterColumnSQL needs a complete table-definiton for PostgreSQL");
-                       return array();
-               }
-               return $this->_recreate_copy_table($tabname,False,$tableflds,$tableoptions);
-       }*/
-       
-       function AlterColumnSQL($tabname, $flds, $tableflds='',$tableoptions='')
-       {
-          // Check if alter single column datatype available - works with 8.0+
-          $has_alter_column = 8.0 <= (float) @$this->serverInfo['version'];
-       
-          if ($has_alter_column) {
-             $tabname = $this->TableName($tabname);
-             $sql = array();
-             list($lines,$pkey) = $this->_GenFields($flds);
-             $alter = 'ALTER TABLE ' . $tabname . $this->alterCol . ' ';
-             foreach($lines as $v) {
-                if ($not_null = preg_match('/NOT NULL/i',$v)) {
-                   $v = preg_replace('/NOT NULL/i','',$v);
-                }
-                // this next block doesn't work - there is no way that I can see to 
-                // explicitly ask a column to be null using $flds
-                else if ($set_null = preg_match('/NULL/i',$v)) {
-                   // if they didn't specify not null, see if they explicitely asked for null
-                   $v = preg_replace('/\sNULL/i','',$v);
-                }
-                
-                if (preg_match('/^([^ ]+) .*DEFAULT ([^ ]+)/',$v,$matches)) {
-                   list(,$colname,$default) = $matches;
-                   $v = preg_replace('/^' . preg_quote($colname) . '\s/', '', $v);
-                   $sql[] = $alter . $colname . ' TYPE ' . str_replace('DEFAULT '.$default,'',$v);
-                   $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET DEFAULT ' . $default;
-                } 
-                else {
-                   // drop default?
-                   preg_match ('/^\s*(\S+)\s+(.*)$/',$v,$matches);
-                   list (,$colname,$rest) = $matches;
-                   $sql[] = $alter . $colname . ' TYPE ' . $rest;
-                }
-       
-                list($colname) = explode(' ',$v);
-                if ($not_null) {
-                   // this does not error out if the column is already not null
-                   $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' SET NOT NULL';
-                }
-                if ($set_null) {
-                   // this does not error out if the column is already null
-                   $sql[] = 'ALTER TABLE '.$tabname.' ALTER COLUMN '.$colname.' DROP NOT NULL';
-                }
-             }
-             return $sql;
-          }
-       
-          // does not have alter column
-          if (!$tableflds) {
-             if ($this->debug) ADOConnection::outp("AlterColumnSQL needs a complete table-definiton for PostgreSQL");
-             return array();
-          }
-          return $this->_recreate_copy_table($tabname,False,$tableflds,$tableoptions);
-       }
-       
-       /**
-        * Drop one column
-        *
-        * Postgres < 7.3 can't do that on it's own, you need to supply the complete defintion of the new table,
-        * to allow, recreating the table and copying the content over to the new table
-        * @param string $tabname table-name
-        * @param string $flds column-name and type for the changed column
-        * @param string $tableflds complete defintion of the new table, eg. for postgres, default ''
-        * @param array/ $tableoptions options for the new table see CreateTableSQL, default ''
-        * @return array with SQL strings
-        */
-       function DropColumnSQL($tabname, $flds, $tableflds='',$tableoptions='')
-       {
-               $has_drop_column = 7.3 <= (float) @$this->serverInfo['version'];
-               if (!$has_drop_column && !$tableflds) {
-                       if ($this->debug) ADOConnection::outp("DropColumnSQL needs complete table-definiton for PostgreSQL < 7.3");
-               return array();
-       }
-               if ($has_drop_column) {
-                       return ADODB_DataDict::DropColumnSQL($tabname, $flds);
-               }
-               return $this->_recreate_copy_table($tabname,$flds,$tableflds,$tableoptions);
-       }
-       
-       /**
-        * Save the content into a temp. table, drop and recreate the original table and copy the content back in
-        *
-        * We also take care to set the values of the sequenz and recreate the indexes.
-        * All this is done in a transaction, to not loose the content of the table, if something went wrong!
-        * @internal
-        * @param string $tabname table-name
-        * @param string $dropflds column-names to drop
-        * @param string $tableflds complete defintion of the new table, eg. for postgres
-        * @param array/string $tableoptions options for the new table see CreateTableSQL, default ''
-        * @return array with SQL strings
-        */
-       function _recreate_copy_table($tabname,$dropflds,$tableflds,$tableoptions='')
-       {
-               if ($dropflds && !is_array($dropflds)) $dropflds = explode(',',$dropflds);
-               $copyflds = array();
-               foreach($this->MetaColumns($tabname) as $fld) {
-                       if (!$dropflds || !in_array($fld->name,$dropflds)) {
-                               // we need to explicit convert varchar to a number to be able to do an AlterColumn of a char column to a nummeric one
-                               if (preg_match('/'.$fld->name.' (I|I2|I4|I8|N|F)/i',$tableflds,$matches) && 
-                                       in_array($fld->type,array('varchar','char','text','bytea'))) {
-                                       $copyflds[] = "to_number($fld->name,'S9999999999999D99')";
-                               } else {
-                                       $copyflds[] = $fld->name;
-                               }
-                               // identify the sequence name and the fld its on
-                               if ($fld->primary_key && $fld->has_default && 
-                                       preg_match("/nextval\('([^']+)'::text\)/",$fld->default_value,$matches)) {
-                                       $seq_name = $matches[1];
-                                       $seq_fld = $fld->name;
-                               }
-                       }
-               }
-               $copyflds = implode(', ',$copyflds);
-               
-               $tempname = $tabname.'_tmp';
-               $aSql[] = 'BEGIN';              // we use a transaction, to make sure not to loose the content of the table
-               $aSql[] = "SELECT * INTO TEMPORARY TABLE $tempname FROM $tabname";
-               $aSql = array_merge($aSql,$this->DropTableSQL($tabname));
-               $aSql = array_merge($aSql,$this->CreateTableSQL($tabname,$tableflds,$tableoptions));
-               $aSql[] = "INSERT INTO $tabname SELECT $copyflds FROM $tempname";
-               if ($seq_name && $seq_fld) {    // if we have a sequence we need to set it again
-                       $seq_name = $tabname.'_'.$seq_fld.'_seq';       // has to be the name of the new implicit sequence
-                       $aSql[] = "SELECT setval('$seq_name',MAX($seq_fld)) FROM $tabname";
-               }
-               $aSql[] = "DROP TABLE $tempname";
-               // recreate the indexes, if they not contain one of the droped columns
-               foreach($this->MetaIndexes($tabname) as $idx_name => $idx_data)
-               {
-                       if (substr($idx_name,-5) != '_pkey' && (!$dropflds || !count(array_intersect($dropflds,$idx_data['columns'])))) {
-                               $aSql = array_merge($aSql,$this->CreateIndexSQL($idx_name,$tabname,$idx_data['columns'],
-                                       $idx_data['unique'] ? array('UNIQUE') : False));
-                       }
-               }
-               $aSql[] = 'COMMIT';
-               return $aSql;
-       }
-       
-       function DropTableSQL($tabname)
-       {
-               $sql = ADODB_DataDict::DropTableSQL($tabname);
-               
-               $drop_seq = $this->_DropAutoIncrement($tabname);
-               if ($drop_seq) $sql[] = $drop_seq;
-               
-               return $sql;
-       }
-
-       // return string must begin with space
-       function _CreateSuffix($fname, &$ftype, $fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
-       {
-               if ($fautoinc) {
-                       $ftype = 'SERIAL';
-                       return '';
-               }
-               $suffix = '';
-               if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
-               if ($fnotnull) $suffix .= ' NOT NULL';
-               if ($fconstraint) $suffix .= ' '.$fconstraint;
-               return $suffix;
-       }
-       
-       // search for a sequece for the given table (asumes the seqence-name contains the table-name!)
-       // if yes return sql to drop it
-       // this is still necessary if postgres < 7.3 or the SERIAL was created on an earlier version!!!
-       function _DropAutoIncrement($tabname)
-       {
-               $tabname = $this->connection->quote('%'.$tabname.'%');
-
-               $seq = $this->connection->GetOne("SELECT relname FROM pg_class WHERE NOT relname ~ 'pg_.*' AND relname LIKE $tabname AND relkind='S'");
-
-               // check if a tables depends on the sequenz and it therefor cant and dont need to be droped separatly
-               if (!$seq || $this->connection->GetOne("SELECT relname FROM pg_class JOIN pg_depend ON pg_class.relfilenode=pg_depend.objid WHERE relname='$seq' AND relkind='S' AND deptype='i'")) {
-                       return False;
-               }
-               return "DROP SEQUENCE ".$seq;
-       }
-       
-       function RenameTableSQL($tabname,$newname)
-       {
-               if (!empty($this->schema)) {
-                       $rename_from = $this->TableName($tabname);
-                       $schema_save = $this->schema;
-                       $this->schema = false;
-                       $rename_to = $this->TableName($newname);
-                       $this->schema = $schema_save;
-                       return array (sprintf($this->renameTable, $rename_from, $rename_to));
-               }
-
-               return array (sprintf($this->renameTable, $this->TableName($tabname),$this->TableName($newname)));
-       }
-       
-       /*
-       CREATE [ [ LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name (
-       { column_name data_type [ DEFAULT default_expr ] [ column_constraint [, ... ] ]
-       | table_constraint } [, ... ]
-       )
-       [ INHERITS ( parent_table [, ... ] ) ]
-       [ WITH OIDS | WITHOUT OIDS ]
-       where column_constraint is:
-       [ CONSTRAINT constraint_name ]
-       { NOT NULL | NULL | UNIQUE | PRIMARY KEY |
-       CHECK (expression) |
-       REFERENCES reftable [ ( refcolumn ) ] [ MATCH FULL | MATCH PARTIAL ]
-       [ ON DELETE action ] [ ON UPDATE action ] }
-       [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
-       and table_constraint is:
-       [ CONSTRAINT constraint_name ]
-       { UNIQUE ( column_name [, ... ] ) |
-       PRIMARY KEY ( column_name [, ... ] ) |
-       CHECK ( expression ) |
-       FOREIGN KEY ( column_name [, ... ] ) REFERENCES reftable [ ( refcolumn [, ... ] ) ]
-       [ MATCH FULL | MATCH PARTIAL ] [ ON DELETE action ] [ ON UPDATE action ] }
-       [ DEFERRABLE | NOT DEFERRABLE ] [ INITIALLY DEFERRED | INITIALLY IMMEDIATE ]
-       */
-       
-       
-       /*
-       CREATE [ UNIQUE ] INDEX index_name ON table
-[ USING acc_method ] ( column [ ops_name ] [, ...] )
-[ WHERE predicate ]
-CREATE [ UNIQUE ] INDEX index_name ON table
-[ USING acc_method ] ( func_name( column [, ... ]) [ ops_name ] )
-[ WHERE predicate ]
-       */
-       function _IndexSQL($idxname, $tabname, $flds, $idxoptions)
-       {
-               $sql = array();
-               
-               if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
-                       $sql[] = sprintf ($this->dropIndex, $idxname, $tabname);
-                       if ( isset($idxoptions['DROP']) )
-                               return $sql;
-               }
-               
-               if ( empty ($flds) ) {
-                       return $sql;
-               }
-               
-               $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : '';
-               
-               $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' ';
-               
-               if (isset($idxoptions['HASH']))
-                       $s .= 'USING HASH ';
-               
-               if ( isset($idxoptions[$this->upperName]) )
-                       $s .= $idxoptions[$this->upperName];
-               
-               if ( is_array($flds) )
-                       $flds = implode(', ',$flds);
-               $s .= '(' . $flds . ')';
-               $sql[] = $s;
-               
-               return $sql;
-       }
-       
-       function _GetSize($ftype, $ty, $fsize, $fprec)
-       {
-               if (strlen($fsize) && $ty != 'X' && $ty != 'B' && $ty  != 'I' && strpos($ftype,'(') === false) {
-                       $ftype .= "(".$fsize;
-                       if (strlen($fprec)) $ftype .= ",".$fprec;
-                       $ftype .= ')';
-               }
-               return $ftype;
-       }
-}
-?>
\ No newline at end of file
diff --git a/lib/adodb/datadict/datadict-sapdb.inc.php b/lib/adodb/datadict/datadict-sapdb.inc.php
deleted file mode 100644 (file)
index 888922b..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-<?php
-
-/**
-  V4.50 6 July 2004  (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-  
-  Modified from datadict-generic.inc.php for sapdb by RalfBecker-AT-outdoor-training.de
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_sapdb extends ADODB_DataDict {
-       
-       var $databaseType = 'sapdb';
-       var $seqField = false;  
-       var $renameColumn = 'RENAME COLUMN %s.%s TO %s';
-       
-       function ActualType($meta)
-       {
-               switch($meta) {
-               case 'C': return 'VARCHAR';
-               case 'XL':
-               case 'X': return 'LONG';
-               
-               case 'C2': return 'VARCHAR UNICODE';
-               case 'X2': return 'LONG UNICODE';
-               
-               case 'B': return 'LONG';
-                       
-               case 'D': return 'DATE';
-               case 'TS':
-               case 'T': return 'TIMESTAMP';
-               
-               case 'L': return 'BOOLEAN';
-               case 'I': return 'INTEGER';
-               case 'I1': return 'FIXED(3)';
-               case 'I2': return 'SMALLINT';
-               case 'I4': return 'INTEGER';
-               case 'I8': return 'FIXED(20)';
-               
-               case 'F': return 'FLOAT(38)';
-               case 'N': return 'FIXED';
-               default:
-                       return $meta;
-               }
-       }
-       
-       function MetaType($t,$len=-1,$fieldobj=false)
-       {
-               if (is_object($t)) {
-                       $fieldobj = $t;
-                       $t = $fieldobj->type;
-                       $len = $fieldobj->max_length;
-               }
-               static $maxdb_type2adodb = array(
-                       'VARCHAR'       => 'C',
-                       'CHARACTER'     => 'C',
-                       'LONG'          => 'X',         // no way to differ between 'X' and 'B' :-(
-                       'DATE'          => 'D',
-                       'TIMESTAMP'     => 'T',
-                       'BOOLEAN'       => 'L',
-                       'INTEGER'       => 'I4',
-                       'SMALLINT'      => 'I2',
-                       'FLOAT'         => 'F',
-                       'FIXED'         => 'N',
-               );
-               $type = isset($maxdb_type2adodb[$t]) ? $maxdb_type2adodb[$t] : 'C';
-
-               // convert integer-types simulated with fixed back to integer
-               if ($t == 'FIXED' && !$fieldobj->scale && ($len == 20 || $len == 3)) {
-                       $type = $len == 20 ? 'I8' : 'I1';
-               }
-               if ($fieldobj->auto_increment) $type = 'R';
-
-               return $type;
-       }
-       
-       // return string must begin with space
-       function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
-       {       
-               $suffix = '';
-               if ($funsigned) $suffix .= ' UNSIGNED';
-               if ($fnotnull) $suffix .= ' NOT NULL';
-               if ($fautoinc) $suffix .= ' DEFAULT SERIAL';
-               elseif (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
-               if ($fconstraint) $suffix .= ' '.$fconstraint;
-               return $suffix;
-       }
-
-       function AddColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName ($tabname);
-               $sql = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               return array( 'ALTER TABLE ' . $tabname . ' ADD (' . implode(', ',$lines) . ')' );
-       }
-       
-       function AlterColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName ($tabname);
-               $sql = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               return array( 'ALTER TABLE ' . $tabname . ' MODIFY (' . implode(', ',$lines) . ')' );
-       }
-
-       function DropColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName ($tabname);
-               if (!is_array($flds)) $flds = explode(',',$flds);
-               foreach($flds as $k => $v) {
-                       $flds[$k] = $this->NameQuote($v);
-               }
-               return array( 'ALTER TABLE ' . $tabname . ' DROP (' . implode(', ',$flds) . ')' );
-       }       
-}
-
-?>
\ No newline at end of file
diff --git a/lib/adodb/datadict/datadict-sqlite.inc.php b/lib/adodb/datadict/datadict-sqlite.inc.php
deleted file mode 100644 (file)
index c53d977..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-       SQLite datadict Andrei Besleaga
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_sqlite extends ADODB_DataDict {
-       var $databaseType = 'sqlite';
-       var $seqField = false;
-       var $addCol=' ADD COLUMN';
-       var $dropTable = 'DROP TABLE IF EXISTS %s';
-       var $dropIndex = 'DROP INDEX IF EXISTS %s';
-       var $renameTable = 'ALTER TABLE %s RENAME TO %s';
-       
-       
-
-       function ActualType($meta)
-       {
-               switch(strtoupper($meta)) {
-               case 'C': return 'VARCHAR'; //  TEXT , TEXT affinity
-               case 'XL':return 'LONGTEXT'; //  TEXT , TEXT affinity
-               case 'X': return 'TEXT'; //  TEXT , TEXT affinity
-               
-               case 'C2': return 'VARCHAR'; //  TEXT , TEXT affinity
-               case 'X2': return 'LONGTEXT'; //  TEXT , TEXT affinity
-               
-               case 'B': return 'LONGBLOB'; //  TEXT , NONE affinity , BLOB
-                       
-               case 'D': return 'DATE'; // NUMERIC , NUMERIC affinity
-               case 'T': return 'DATETIME'; // NUMERIC , NUMERIC affinity
-               case 'L': return 'TINYINT'; // NUMERIC , INTEGER affinity
-               
-               case 'R': 
-               case 'I4':
-               case 'I': return 'INTEGER'; // NUMERIC , INTEGER affinity
-               case 'I1': return 'TINYINT'; // NUMERIC , INTEGER affinity
-               case 'I2': return 'SMALLINT'; // NUMERIC , INTEGER affinity
-               case 'I8': return 'BIGINT'; // NUMERIC , INTEGER affinity
-               
-               case 'F': return 'DOUBLE'; // NUMERIC , REAL affinity
-               case 'N': return 'NUMERIC'; // NUMERIC , NUMERIC affinity
-               default:
-                       return $meta;
-               }
-       }
-       
-       // return string must begin with space
-       function _CreateSuffix($fname,$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
-       {       
-               $suffix = '';
-               if ($funsigned) $suffix .= ' UNSIGNED';
-               if ($fnotnull) $suffix .= ' NOT NULL';
-               if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
-               if ($fautoinc) $suffix .= ' AUTOINCREMENT';
-               if ($fconstraint) $suffix .= ' '.$fconstraint;
-               return $suffix;
-       }
-       
-       function AlterColumnSQL($tabname, $flds)
-       {
-               if ($this->debug) ADOConnection::outp("AlterColumnSQL not supported natively by SQLite");
-               return array();
-       }
-       
-       function DropColumnSQL($tabname, $flds)
-       {
-               if ($this->debug) ADOConnection::outp("DropColumnSQL not supported natively by SQLite");
-               return array();
-       }
-       
-       function RenameColumnSQL($tabname,$oldcolumn,$newcolumn,$flds='')
-       {
-               if ($this->debug) ADOConnection::outp("RenameColumnSQL not supported natively by SQLite");
-               return array(); 
-       }
-       
-}
-?>
diff --git a/lib/adodb/datadict/datadict-sybase.inc.php b/lib/adodb/datadict/datadict-sybase.inc.php
deleted file mode 100644 (file)
index fea2d98..0000000
+++ /dev/null
@@ -1,229 +0,0 @@
-<?php
-
-/**
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
-  Released under both BSD license and Lesser GPL library license. 
-  Whenever there is any discrepancy between the two licenses, 
-  the BSD license will take precedence.
-       
-  Set tabs to 4 for best viewing.
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-class ADODB2_sybase extends ADODB_DataDict {
-       var $databaseType = 'sybase';
-       
-       var $dropIndex = 'DROP INDEX %2$s.%1$s';
-       
-       function MetaType($t,$len=-1,$fieldobj=false)
-       {
-               if (is_object($t)) {
-                       $fieldobj = $t;
-                       $t = $fieldobj->type;
-                       $len = $fieldobj->max_length;
-               }
-               
-               $len = -1; // mysql max_length is not accurate
-               switch (strtoupper($t)) {
-
-               case 'INT': 
-               case 'INTEGER': return  'I';
-               case 'BIT':
-               case 'TINYINT': return  'I1';
-               case 'SMALLINT': return 'I2';
-               case 'BIGINT':  return  'I8';
-               
-               case 'REAL':
-               case 'FLOAT': return 'F';
-               default: return parent::MetaType($t,$len,$fieldobj);
-               }
-       }
-       
-       function ActualType($meta)
-       {
-               switch(strtoupper($meta)) {
-               case 'C': return 'VARCHAR';
-               case 'XL':
-               case 'X': return 'TEXT';
-               
-               case 'C2': return 'NVARCHAR';
-               case 'X2': return 'NTEXT';
-               
-               case 'B': return 'IMAGE';
-                       
-               case 'D': return 'DATETIME';
-               case 'TS':
-               case 'T': return 'DATETIME';
-               case 'L': return 'BIT';
-               
-               case 'I': return 'INT'; 
-               case 'I1': return 'TINYINT';
-               case 'I2': return 'SMALLINT';
-               case 'I4': return 'INT';
-               case 'I8': return 'BIGINT';
-               
-               case 'F': return 'REAL';
-               case 'N': return 'NUMERIC';
-               default:
-                       return $meta;
-               }
-       }
-       
-       
-       function AddColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName ($tabname);
-               $f = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               $s = "ALTER TABLE $tabname $this->addCol";
-               foreach($lines as $v) {
-                       $f[] = "\n $v";
-               }
-               $s .= implode(', ',$f);
-               $sql[] = $s;
-               return $sql;
-       }
-       
-       function AlterColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName ($tabname);
-               $sql = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               foreach($lines as $v) {
-                       $sql[] = "ALTER TABLE $tabname $this->alterCol $v";
-               }
-
-               return $sql;
-       }
-       
-       function DropColumnSQL($tabname, $flds)
-       {
-               $tabname = $this->TableName($tabname);
-               if (!is_array($flds)) $flds = explode(',',$flds);
-               $f = array();
-               $s = "ALTER TABLE $tabname";
-               foreach($flds as $v) {
-                       $f[] = "\n$this->dropCol ".$this->NameQuote($v);
-               }
-               $s .= implode(', ',$f);
-               $sql[] = $s;
-               return $sql;
-       }
-       
-       // return string must begin with space
-       function _CreateSuffix($fname,&$ftype,$fnotnull,$fdefault,$fautoinc,$fconstraint,$funsigned)
-       {       
-               $suffix = '';
-               if (strlen($fdefault)) $suffix .= " DEFAULT $fdefault";
-               if ($fautoinc) $suffix .= ' DEFAULT AUTOINCREMENT';
-               if ($fnotnull) $suffix .= ' NOT NULL';
-               else if ($suffix == '') $suffix .= ' NULL';
-               if ($fconstraint) $suffix .= ' '.$fconstraint;
-               return $suffix;
-       }
-       
-       /*
-CREATE TABLE 
-    [ database_name.[ owner ] . | owner. ] table_name 
-    ( { < column_definition > 
-        | column_name AS computed_column_expression 
-        | < table_constraint > ::= [ CONSTRAINT constraint_name ] }
-
-            | [ { PRIMARY KEY | UNIQUE } [ ,...n ] 
-    ) 
-
-[ ON { filegroup | DEFAULT } ] 
-[ TEXTIMAGE_ON { filegroup | DEFAULT } ] 
-
-< column_definition > ::= { column_name data_type } 
-    [ COLLATE < collation_name > ] 
-    [ [ DEFAULT constant_expression ] 
-        | [ IDENTITY [ ( seed , increment ) [ NOT FOR REPLICATION ] ] ]
-    ] 
-    [ ROWGUIDCOL] 
-    [ < column_constraint > ] [ ...n ] 
-
-< column_constraint > ::= [ CONSTRAINT constraint_name ] 
-    { [ NULL | NOT NULL ] 
-        | [ { PRIMARY KEY | UNIQUE } 
-            [ CLUSTERED | NONCLUSTERED ] 
-            [ WITH FILLFACTOR = fillfactor ] 
-            [ON {filegroup | DEFAULT} ] ] 
-        ] 
-        | [ [ FOREIGN KEY ] 
-            REFERENCES ref_table [ ( ref_column ) ] 
-            [ ON DELETE { CASCADE | NO ACTION } ] 
-            [ ON UPDATE { CASCADE | NO ACTION } ] 
-            [ NOT FOR REPLICATION ] 
-        ] 
-        | CHECK [ NOT FOR REPLICATION ] 
-        ( logical_expression ) 
-    } 
-
-< table_constraint > ::= [ CONSTRAINT constraint_name ] 
-    { [ { PRIMARY KEY | UNIQUE } 
-        [ CLUSTERED | NONCLUSTERED ] 
-        { ( column [ ASC | DESC ] [ ,...n ] ) } 
-        [ WITH FILLFACTOR = fillfactor ] 
-        [ ON { filegroup | DEFAULT } ] 
-    ] 
-    | FOREIGN KEY 
-        [ ( column [ ,...n ] ) ] 
-        REFERENCES ref_table [ ( ref_column [ ,...n ] ) ] 
-        [ ON DELETE { CASCADE | NO ACTION } ] 
-        [ ON UPDATE { CASCADE | NO ACTION } ] 
-        [ NOT FOR REPLICATION ] 
-    | CHECK [ NOT FOR REPLICATION ] 
-        ( search_conditions ) 
-    } 
-
-
-       */
-       
-       /*
-       CREATE [ UNIQUE ] [ CLUSTERED | NONCLUSTERED ] INDEX index_name 
-    ON { table | view } ( column [ ASC | DESC ] [ ,...n ] ) 
-               [ WITH < index_option > [ ,...n] ] 
-               [ ON filegroup ]
-               < index_option > :: = 
-                   { PAD_INDEX | 
-                       FILLFACTOR = fillfactor | 
-                       IGNORE_DUP_KEY | 
-                       DROP_EXISTING | 
-                   STATISTICS_NORECOMPUTE | 
-                   SORT_IN_TEMPDB  
-               }
-*/
-       function _IndexSQL($idxname, $tabname, $flds, $idxoptions)
-       {
-               $sql = array();
-               
-               if ( isset($idxoptions['REPLACE']) || isset($idxoptions['DROP']) ) {
-                       $sql[] = sprintf ($this->dropIndex, $idxname, $tabname);
-                       if ( isset($idxoptions['DROP']) )
-                               return $sql;
-               }
-               
-               if ( empty ($flds) ) {
-                       return $sql;
-               }
-               
-               $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : '';
-               $clustered = isset($idxoptions['CLUSTERED']) ? ' CLUSTERED' : '';
-               
-               if ( is_array($flds) )
-                       $flds = implode(', ',$flds);
-               $s = 'CREATE' . $unique . $clustered . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')';
-               
-               if ( isset($idxoptions[$this->upperName]) )
-                       $s .= $idxoptions[$this->upperName];
-
-               $sql[] = $s;
-               
-               return $sql;
-       }
-}
-?>
\ No newline at end of file
index ef94e9b..eea7ccf 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
index 671e858..70eeb2d 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 30d192d..514a0d4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 5b30f44..f692534 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
 Released under both BSD license and Lesser GPL library license. 
 Whenever there is any discrepancy between the two licenses, 
 the BSD license will take precedence. See License.txt. 
index dd2f58a..fcd2d95 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index b19210f..c6c377c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 5606ca6..6e7fca5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index faf6c0a..745035a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-  V5.11 5 May 2010   (c) 2000-2010 (jlim#natsoft.com). All rights reserved.
+  V5.14 8 Sept 2011  (c) 2000-2011 (jlim#natsoft.com). All rights reserved.
 
   This is a version of the ADODB driver for DB2.  It uses the 'ibm_db2' PECL extension
   for PHP (http://pecl.php.net/package/ibm_db2), which in turn requires DB2 V8.2.2 or
index 6afa944..9cf86bc 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index e02e269..91c29aa 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 1cb5597..ba6da84 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
- @version V5.11 5 May 2010  (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+ @version V5.14 8 Sept 2011 (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
  Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 3bb07e7..cb1ac10 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 71c3a5e..e600667 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.  
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.  
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 18ad037..a5637ff 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
-* @version V5.11 5 May 2010  (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+* @version V5.14 8 Sept 2011 (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
 * Released under both BSD license and Lesser GPL library license.
 * Whenever there is any discrepancy between the two licenses,
 * the BSD license will take precedence.
index 1c9aec6..b894700 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim. All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim. All rights reserved.
   Released under both BSD license and Lesser GPL library license.
   Whenever there is any discrepancy between the two licenses,
   the BSD license will take precedence.
index 4c5eb1a..16f38ad 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
    Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 9de8f78..a63b481 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 78d2c6c..740645e 100644 (file)
@@ -9,7 +9,7 @@
 // ADOdb  - Database Abstraction Library for PHP                         //
 //          http://adodb.sourceforge.net/                                //
 //                                                                       //
-// Copyright (c) 2000-2010 John Lim (jlim\@natsoft.com.my)               //
+// Copyright (c) 2000-2011 John Lim (jlim\@natsoft.com.my)               //
 //          All rights reserved.                                         //
 //          Released under both BSD license and LGPL library license.    //
 //          Whenever there is any discrepancy between the two licenses,  //
index 8b326ab..157ea02 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
@@ -156,6 +156,7 @@ class ADODB_mssqlnative extends ADOConnection {
                } else 
                        $savem = $this->SetFetchMode(ADODB_FETCH_NUM);
                $arrServerInfo = sqlsrv_server_info($this->_connectionID);
+               $ADODB_FETCH_MODE = $savem;
                $arr['description'] = $arrServerInfo['SQLServerName'].' connected to '.$arrServerInfo['CurrentDatabase'];
                $arr['version'] = $arrServerInfo['SQLServerVersion'];//ADOConnection::_findvers($arr['description']);
                return $arr;
@@ -461,15 +462,7 @@ class ADODB_mssqlnative extends ADOConnection {
                } else {
                        $rez = sqlsrv_query($this->_connectionID,$sql);
                }
-        if ($this->debug) error_log("<hr>running query: ".var_export($sql,true)."<hr>input array: ".var_export($inputarr,true)."<hr>result: ".var_export($rez,true));//"<hr>connection: ".serialize($this->_connectionID)
-        //fix for returning true on anything besides select statements
-        if (is_array($sql)) $sql = $sql[1];
-        $sql = ltrim($sql);
-        if(stripos($sql, 'SELECT') !== 0 && $rez !== false) {
-            if ($this->debug) error_log(" isn't a select query, returning boolean true");
-            return true;
-        }
-        //end fix
+        if ($this->debug) error_log("<hr>running query: ".var_export($sql,true)."<hr>input array: ".var_export($inputarr,true)."<hr>result: ".var_export($rez,true));
         if(!$rez) $rez = false;
                return $rez;
        }
@@ -486,12 +479,12 @@ class ADODB_mssqlnative extends ADOConnection {
        // mssql uses a default date like Dec 30 2000 12:00AM
        static function UnixDate($v)
        {
-               return ADORecordSet_array_mssql::UnixDate($v);
+               return ADORecordSet_array_mssqlnative::UnixDate($v);
        }
        
        static function UnixTimeStamp($v)
        {
-               return ADORecordSet_array_mssql::UnixTimeStamp($v);
+               return ADORecordSet_array_mssqlnative::UnixTimeStamp($v);
        }       
 
        function &MetaIndexes($table,$primary=false, $owner = false)
@@ -702,7 +695,7 @@ class ADORecordset_mssqlnative extends ADORecordSet {
                fields in a certain query result. If the field offset isn't specified, the next field that wasn't yet retrieved by
                fetchField() is retrieved.      */
 
-       function &FetchField($fieldOffset = -1) 
+       function FetchField($fieldOffset = -1) 
        {
         if ($this->connection->debug) error_log("<hr>fetchfield: $fieldOffset, fetch array: <pre>".print_r($this->fields,true)."</pre> backtrace: ".adodb_backtrace(false));
                if ($fieldOffset != -1) $this->fieldOffset = $fieldOffset;
@@ -710,7 +703,8 @@ class ADORecordset_mssqlnative extends ADORecordSet {
                if(array_key_exists($this->fieldOffset,$arrKeys) && !array_key_exists($arrKeys[$this->fieldOffset],$this->fields)) {
                        $f = false;
                } else {
-                       $f = $this->fields[ $arrKeys[$this->fieldOffset] ];
+                       $f = new ADOFetchObj();
+                       $f->name = $arrKeys[$this->fieldOffset];
                        if($fieldOffset == -1) $this->fieldOffset++;
                }
 
@@ -748,7 +742,7 @@ class ADORecordset_mssqlnative extends ADORecordSet {
        function _fetch($ignore_fields=false) 
        {
         if ($this->connection->debug) error_log("_fetch()");
-               if ($this->fetchMode & ADODB_FETCH_ASSOC) {
+               if ($this->fetchMode & ADODB_FETCH_BOTH) {
                        if ($this->fetchMode & ADODB_FETCH_NUM) {
                 if ($this->connection->debug) error_log("fetch mode: both");
                                $this->fields = @sqlsrv_fetch_array($this->_queryID,SQLSRV_FETCH_BOTH);
index dd3b377..0a0ea57 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
-* @version V5.11 5 May 2010  (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+* @version V5.14 8 Sept 2011 (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
 * Released under both BSD license and Lesser GPL library license.
 * Whenever there is any discrepancy between the two licenses,
 * the BSD license will take precedence.
index 4b215e5..8252b67 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 094c150..4ba3f10 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
@@ -99,6 +99,9 @@ class ADODB_mysqli extends ADOConnection {
                        mysqli_options($this->_connectionID,$arr[0],$arr[1]);
                }
 
+               //http ://php.net/manual/en/mysqli.persistconns.php
+               if ($persist && PHP_VERSION > 5.2 && strncmp($argHostname,'p:',2) != 0) $argHostname = 'p:'.$argHostname;
+
                #if (!empty($this->port)) $argHostname .= ":".$this->port;
                $ok = mysqli_real_connect($this->_connectionID,
                                    $argHostname,
@@ -144,10 +147,13 @@ class ADODB_mysqli extends ADOConnection {
        // do not use $ADODB_COUNTRECS
        function GetOne($sql,$inputarr=false)
        {
+       global $ADODB_GETONE_EOF;
+       
                $ret = false;
                $rs = $this->Execute($sql,$inputarr);
-               if ($rs) {      
-                       if (!$rs->EOF) $ret = reset($rs->fields);
+               if ($rs) {
+                       if ($rs->EOF) $ret = $ADODB_GETONE_EOF;
+                       else $ret = reset($rs->fields);
                        $rs->Close();
                }
                return $ret;
index 668bdcf..5327834 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 5007b75..f300143 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 0f5a1ee..f8322de 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
  
   First cut at the Netezza Driver by Josh Eldridge joshuae74#hotmail.com
  Based on the previous postgres drivers.
index 360b6b4..4164063 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
 
-  version V5.11 5 May 2010  (c) 2000-2010 John Lim. All rights reserved.
+  version V5.14 8 Sept 2011 (c) 2000-2011 John Lim. All rights reserved.
 
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
@@ -72,8 +72,15 @@ class ADODB_oci8 extends ADOConnection {
   where owner='%s' and table_name='%s' order by column_id"; // when there is a schema
        var $_bindInputArray = true;
        var $hasGenID = true;
-       var $_genIDSQL = "SELECT (%s.nextval) FROM DUAL";
-       var $_genSeqSQL = "CREATE SEQUENCE %s START WITH %s";
+       var $_genIDSQL = "SELECT (%s.nextval) FROM DUAL";       
+       var $_genSeqSQL = "
+DECLARE
+  PRAGMA AUTONOMOUS_TRANSACTION;
+BEGIN
+       execute immediate 'CREATE SEQUENCE %s START WITH %s';
+END;
+";
+
        var $_dropSeqSQL = "DROP SEQUENCE %s";
        var $hasAffectedRows = true;
        var $random = "abs(mod(DBMS_RANDOM.RANDOM,10000001)/10000000)";
@@ -326,9 +333,9 @@ NATSOFT.DOMAIN =
                if (empty($ts) && $ts !== 0) return 'null';
                if ($isfld) return 'TO_DATE(substr('.$ts.",1,19),'RRRR-MM-DD, HH24:MI:SS')";
                if (is_string($ts)) $ts = ADORecordSet::UnixTimeStamp($ts);
-               
+       
                if (is_object($ts)) $tss = $ts->format("'Y-m-d H:i:s'");
-               else $tss = adodb_date("'Y-m-d H:i:s'",$ts);
+               else $tss = date("'Y-m-d H:i:s'",$ts);
                
                return 'TO_DATE('.$tss.",'RRRR-MM-DD, HH24:MI:SS')";
        }
@@ -598,10 +605,13 @@ NATSOFT.DOMAIN =
        {
                // seems that oracle only supports 1 hint comment in 8i
                if ($this->firstrows) {
+                       if ($nrows > 500 && $nrows < 1000) $hint = "FIRST_ROWS($nrows)";
+                       else $hint = 'FIRST_ROWS';
+                       
                        if (strpos($sql,'/*+') !== false)
-                               $sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql);
+                               $sql = str_replace('/*+ ',"/*+$hint ",$sql);
                        else
-                               $sql = preg_replace('/^[ \t\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql);
+                               $sql = preg_replace('/^[ \t\n]*select/i',"SELECT /*+$hint*/",$sql);
                }
                
                if ($offset == -1 || ($offset < $this->selectOffsetAlg1 && 0 < $nrows && $nrows < 1000)) {
@@ -788,11 +798,14 @@ NATSOFT.DOMAIN =
                if ($inputarr) {
                        #if (!is_array($inputarr)) $inputarr = array($inputarr);
                        
-                       $element0 = reset($inputarr);
+                       $element0 = reset($inputarr); 
+                       $array2d =  $this->bulkBind && is_array($element0) && !is_object(reset($element0));
+                       
+                       # see http://phplens.com/lens/lensforum/msgs.php?id=18786
+                       if ($array2d || !$this->_bindInputArray) {
                        
-                       if (!$this->_bindInputArray) {
                        # is_object check because oci8 descriptors can be passed in
-                       if (is_array($element0) && !is_object(reset($element0))) {
+                       if ($array2d && $this->_bindInputArray) {
                                if (is_string($sql))
                                        $stmt = $this->Prepare($sql);
                                else
@@ -802,6 +815,7 @@ NATSOFT.DOMAIN =
                                        $ret = $this->_Execute($stmt,$arr);
                                        if (!$ret) return $ret;
                                }
+                               return $ret;
                        } else {
                                $sqlarr = explode(':',$sql);
                                $sql = '';
index 6d8a202..d017257 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /** 
- * @version V5.11 5 May 2010  (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.14 8 Sept 2011 (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
  * Released under both BSD license and Lesser GPL library license. 
  * Whenever there is any discrepancy between the two licenses, 
  * the BSD license will take precedence. 
index 3f80db1..4202183 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim. All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim. All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
@@ -49,6 +49,11 @@ class ADODB_oci8po extends ADODB_oci8 {
                return ADODB_oci8::Prepare($sql,$cursor);
        }
        
+       function Execute($sql,$inputarr=false) 
+       {
+               return ADOConnection::Execute($sql,$inputarr);
+       }
+       
        // emulate handling of parameters ? ?, replacing with :bind0 :bind1
        function _query($sql,$inputarr=false)
        {
index 0beb4bf..9089616 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 8bec473..5b56cec 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index fe47341..6a67678 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 7c2c77f..a00fab2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 2c7b124..7c9ebef 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license.
   Whenever there is any discrepancy between the two licenses,
   the BSD license will take precedence. See License.txt.
index e61cee7..ce93961 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-       V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+       V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license.
   Whenever there is any discrepancy between the two licenses,
   the BSD license will take precedence. See License.txt.
index fa18eee..4c6cbb1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index bc88507..652e370 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 5a7dd51..6e2be46 100644 (file)
@@ -2,7 +2,7 @@
 
 
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 94b59fb..8809072 100644 (file)
@@ -2,7 +2,7 @@
 
 
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 6e9dcc0..d7c6b72 100644 (file)
@@ -2,7 +2,7 @@
 
 
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 5405dc3..62ca0f6 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 0306a05..80c9548 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /* 
- V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
index 6f580ff..3c313d1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
- V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 8258149..3b07227 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
- V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
@@ -109,6 +109,8 @@ WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
        var $_bindInputArray = false; // requires postgresql 7.3+ and ability to modify database
        var $disableBlobs = false; // set to true to disable blob checking, resulting in 2-5% improvement in performance.
        
+       var $_pnum = 0;
+       
        // The last (fmtTimeStamp is not entirely correct: 
        // PostgreSQL also has support for time zones, 
        // and writes these time in this format: "2001-03-01 18:59:26+02". 
@@ -206,19 +208,17 @@ a different OID if a database must be reloaded. */
        {
                $info = $this->ServerInfo();
                if ($info['version'] >= 7.3) {
-               $this->metaTablesSQL = "select tablename,'T' from pg_tables where tablename not like 'pg\_%'
-                         and schemaname  not in ( 'pg_catalog','information_schema')
-       union 
-        select viewname,'V' from pg_views where viewname not like 'pg\_%'  and schemaname  not in ( 'pg_catalog','information_schema') ";
+               $this->metaTablesSQL = "select table_name,'T' from information_schema.tables where table_schema not in ( 'pg_catalog','information_schema')
+                       union
+                      select table_name,'V' from information_schema.views where table_schema not in ( 'pg_catalog','information_schema') ";
                }
                if ($mask) {
                        $save = $this->metaTablesSQL;
                        $mask = $this->qstr(strtolower($mask));
                        if ($info['version']>=7.3)
-                               $this->metaTablesSQL = "
-select tablename,'T' from pg_tables where tablename like $mask and schemaname not in ( 'pg_catalog','information_schema')  
- union 
-select viewname,'V' from pg_views where viewname like $mask and schemaname  not in ( 'pg_catalog','information_schema')  ";
+                               $this->metaTablesSQL = "select table_name,'T' from information_schema.tables where table_name like $mask and table_schema not in ( 'pg_catalog','information_schema')
+                       union
+                      select table_name,'V' from information_schema.views where table_name like $mask and table_schema not in ( 'pg_catalog','information_schema') ";
                        else
                                $this->metaTablesSQL = "
 select tablename,'T' from pg_tables where tablename like $mask 
@@ -444,7 +444,6 @@ select viewname,'V' from pg_views where viewname like $mask";
        // assumes bytea for blob, and varchar for clob
        function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB')
        {
-       
                if ($blobtype == 'CLOB') {
                return $this->Execute("UPDATE $table SET $column=" . $this->qstr($val) . " WHERE $where");
                }
@@ -583,7 +582,13 @@ select viewname,'V' from pg_views where viewname like $mask";
                        return $retarr; 
                
        }
-
+       
+       function Param($name)
+       {
+               $this->_pnum += 1;
+               return '$'.$this->_pnum;
+       }
+       
          function MetaIndexes ($table, $primary = FALSE, $owner = false)
       {
          global $ADODB_FETCH_MODE;
@@ -721,6 +726,7 @@ WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\'))';
        // returns queryID or false
        function _query($sql,$inputarr=false)
        {
+               $this->_pnum = 0;
                $this->_errorMsg = false;
                if ($inputarr) {
                /*
@@ -898,6 +904,7 @@ class ADORecordSet_postgres64 extends ADORecordSet{
                $row = ADORecordSet::GetRowAssoc($upper);
                return $row;
        }
+       
 
        function _initrs()
        {
@@ -950,8 +957,8 @@ class ADORecordSet_postgres64 extends ADORecordSet{
        function _decode($blob)
        {
                if ($blob === NULL) return NULL;
-               eval('$realblob="'.adodb_str_replace(array('"','$'),array('\"','\$'),$blob).'";');
-               return $realblob;       
+//             eval('$realblob="'.adodb_str_replace(array('"','$'),array('\"','\$'),$blob).'";');
+               return pg_unescape_bytea($blob);
        }
        
        function _fixblobs()
index eecfdc3..36d7a2f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
- V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
@@ -22,6 +22,7 @@ class ADODB_postgres7 extends ADODB_postgres64 {
        var $ansiOuter = true;
        var $charSet = true; //set to true for Postgres 7 and above - PG client supports encodings
        
+       
        function ADODB_postgres7() 
        {
                $this->ADODB_postgres64();
@@ -146,6 +147,8 @@ class ADODB_postgres7 extends ADODB_postgres64 {
                        // We don't have native support for parameterized queries, so let's emulate it at the parent
                        return ADODB_postgres64::_query($sql, $inputarr);
                }
+               
+               $this->_pnum = 0;
                $this->_errorMsg = false;
                // -- added Cristiano da Cunha Duarte
                if ($inputarr) {
index 3134e3c..14e6e70 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
- V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index a7292b8..0c1521b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index 8a4bf9a..c5f0dc1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 3933d85..d7cadf9 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-version V5.06 16 Oct 2008  (c) 2000-2010  John Lim (jlim#natsoft.com).  All rights
+version V5.14 8 Sept 2011  (c) 2000-2011  John Lim (jlim#natsoft.com).  All rights
 reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
index bb95a42..d45d21b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
@@ -104,7 +104,8 @@ class ADODB_sqlite extends ADOConnection {
            $fld->max_length = $size;
            $fld->not_null = $r['notnull'];
            $fld->default_value = $r['dflt_value'];
-           $fld->scale = 0;
+           $fld->scale = 0;    
+               if (isset($r['pk']) && $r['pk']) $fld->primary_key=1;
            if ($save == ADODB_FETCH_NUM) $arr[] = $fld;        
            else $arr[strtoupper($fld->name)] = $fld;
          }
diff --git a/lib/adodb/drivers/adodb-sqlite3.inc.php b/lib/adodb/drivers/adodb-sqlite3.inc.php
new file mode 100644 (file)
index 0000000..f55311a
--- /dev/null
@@ -0,0 +1,430 @@
+<?php
+/*
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
+  Released under both BSD license and Lesser GPL library license. 
+  Whenever there is any discrepancy between the two licenses, 
+  the BSD license will take precedence.
+
+  Latest version is available at http://adodb.sourceforge.net
+  
+  SQLite info: http://www.hwaci.com/sw/sqlite/
+    
+  Install Instructions:
+  ====================
+  1. Place this in adodb/drivers
+  2. Rename the file, remove the .txt prefix.
+*/
+
+// security - hide paths
+if (!defined('ADODB_DIR')) die();
+
+// class ADODB_sqlite extends ADOConnection { **change
+class ADODB_sqlite3 extends ADOConnection {
+       //var $databaseType = "sqlite"; **change
+       var $databaseType = "sqlite3";
+       var $replaceQuote = "''"; // string to use to replace quotes
+       var $concat_operator='||';
+       var $_errorNo = 0;
+       var $hasLimit = true;   
+       var $hasInsertID = true;                /// supports autoincrement ID?
+       var $hasAffectedRows = true;    /// supports affected rows for update/delete?
+       var $metaTablesSQL = "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name";
+       var $sysDate = "adodb_date('Y-m-d')";
+       var $sysTimeStamp = "adodb_date('Y-m-d H:i:s')";
+       var $fmtTimeStamp = "'Y-m-d H:i:s'";
+       
+       //function ADODB_sqlite3() **change
+       function ADODB_sqlite3() 
+       {
+       }
+       
+/*
+  function __get($name) 
+  {
+       switch($name) {
+       case 'sysDate': return "'".date($this->fmtDate)."'";
+       case 'sysTimeStamp' : return "'".date($this->sysTimeStamp)."'";
+       }
+  }*/
+       
+       function ServerInfo()
+       {
+               $arr['version'] = sqlite_libversion(); //**tochange
+               $arr['description'] = 'SQLite '; //**tochange
+               $arr['encoding'] = sqlite_libencoding();//**tochange
+               return $arr;
+       }
+       
+       function BeginTrans()
+       {         
+                if ($this->transOff) return true; 
+                $ret = $this->Execute("BEGIN TRANSACTION");
+                $this->transCnt += 1;
+                return true;
+       }
+       
+       function CommitTrans($ok=true) 
+       { 
+               if ($this->transOff) return true; 
+               if (!$ok) return $this->RollbackTrans();
+               $ret = $this->Execute("COMMIT");
+               if ($this->transCnt>0)$this->transCnt -= 1;
+               return !empty($ret);
+       }
+       
+       function RollbackTrans()
+       {
+               if ($this->transOff) return true; 
+               $ret = $this->Execute("ROLLBACK");
+               if ($this->transCnt>0)$this->transCnt -= 1;
+               return !empty($ret);
+       }
+       
+       // mark newnham
+       function MetaColumns($table, $normalize=true) 
+       {
+         global $ADODB_FETCH_MODE;
+         $false = false;
+         $save = $ADODB_FETCH_MODE;
+         $ADODB_FETCH_MODE = ADODB_FETCH_ASSOC;
+         if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+         $rs = $this->Execute("PRAGMA table_info('$table')");
+         if (isset($savem)) $this->SetFetchMode($savem);
+         if (!$rs) {
+           $ADODB_FETCH_MODE = $save; 
+           return $false;
+         }
+         $arr = array();
+         while ($r = $rs->FetchRow()) {
+         
+           $type = explode('(',$r['type']);
+           $size = '';
+           if (sizeof($type)==2)
+           $size = trim($type[1],')');
+           $fn = strtoupper($r['name']);
+           $fld = new ADOFieldObject;
+           $fld->name = $r['name'];
+           $fld->type = $type[0];
+           $fld->max_length = $size;
+           $fld->not_null = $r['notnull'];
+           $fld->default_value = $r['dflt_value'];
+           $fld->scale = 0;
+               if (isset($r['pk']) && $r['pk']) $fld->primary_key=1;
+           if ($save == ADODB_FETCH_NUM) $arr[] = $fld;        
+           else $arr[strtoupper($fld->name)] = $fld;
+         }
+         $rs->Close();
+         $ADODB_FETCH_MODE = $save;
+         return $arr;
+       }
+       
+       function _init($parentDriver)
+       {
+       
+               $parentDriver->hasTransactions = false;
+               $parentDriver->hasInsertID = true;
+       }
+
+       function _insertid()
+       {
+               //return sqlite_last_insert_rowid($this->_connectionID)->; //**change
+               $temp = $this->_connectionID;
+               return $temp->lastInsertRowID();
+       }
+       
+       function _affectedrows()
+       {
+       return sqlite3_changes($this->_connectionID); //**tochange
+    }
+       
+       function ErrorMsg() 
+       {
+               if ($this->_logsql) return $this->_errorMsg;
+               
+               return ($this->_errorNo) ? sqlite_error_string($this->_errorNo) : ''; //**tochange?
+       }
+       function ErrorNo() 
+       {
+               return $this->_errorNo; //**tochange??
+       }
+       
+       function SQLDate($fmt, $col=false)
+       {
+               $fmt = $this->qstr($fmt);
+               return ($col) ? "adodb_date2($fmt,$col)" : "adodb_date($fmt)";
+       }
+       
+       
+       function _createFunctions()
+       {
+               //@sqlite3_create_function($this->_connectionID, 'adodb_date', 'adodb_date', 1); *change
+               $this->_connectionID->createFunction('adodb_date', 'adodb_date', 1);
+               
+               //@sqlite3_create_function($this->_connectionID, 'adodb_date2', 'adodb_date2', 2);**change
+               $this->_connectionID->createFunction('adodb_date2', 'adodb_date2', 2);
+       }
+       
+
+       // returns true or false
+       function _connect($argHostname, $argUsername, $argPassword, $argDatabasename) //**tochange: all the function need to be changed, just hacks for the moment
+       {
+               $this->_connectionID = new SQLite3('/path/mydb'); // hack
+               if (empty($argHostname) && $argDatabasename) $argHostname = $argDatabasename; // hack
+               $this->_createFunctions();
+               
+               return true; // hack
+               
+               if (!function_exists('sqlite_open')) return null;
+               if (empty($argHostname) && $argDatabasename) $argHostname = $argDatabasename;
+               
+               $this->_connectionID = sqlite_open($argHostname);
+               if ($this->_connectionID === false) return false;
+               $this->_createFunctions();
+               return true;
+       }
+       
+       // returns true or false
+       function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename) //**tochange
+       {
+               if (!function_exists('sqlite_open')) return null;
+               if (empty($argHostname) && $argDatabasename) $argHostname = $argDatabasename;
+               
+               $this->_connectionID = sqlite_popen($argHostname);
+               if ($this->_connectionID === false) return false;
+               $this->_createFunctions();
+               return true;
+       }
+
+       // returns query ID if successful, otherwise false
+       function _query($sql,$inputarr=false)
+       {
+               //$rez = sqlite_query($sql,$this->_connectionID);//**change
+               $rez = $this->_connectionID->query($sql);
+               if (!$rez) {
+                       //$this->_errorNo = sqlite3_last_error($this->_connectionID);**change
+                       $this->_connectionID->lastErrorCode();
+               }
+               
+               return $rez;
+       }
+       
+       function SelectLimit($sql,$nrows=-1,$offset=-1,$inputarr=false,$secs2cache=0) 
+       {
+               $offsetStr = ($offset >= 0) ? " OFFSET $offset" : '';
+               $limitStr  = ($nrows >= 0)  ? " LIMIT $nrows" : ($offset >= 0 ? ' LIMIT 999999999' : '');
+               if ($secs2cache)
+                       $rs = $this->CacheExecute($secs2cache,$sql."$limitStr$offsetStr",$inputarr);
+               else
+                       $rs = $this->Execute($sql."$limitStr$offsetStr",$inputarr);
+                       
+               return $rs;
+       }
+       
+       /*
+               This algorithm is not very efficient, but works even if table locking
+               is not available.
+               
+               Will return false if unable to generate an ID after $MAXLOOPS attempts.
+       */
+       var $_genSeqSQL = "create table %s (id integer)";
+       
+       function GenID($seq='adodbseq',$start=1)
+       {       
+               // if you have to modify the parameter below, your database is overloaded,
+               // or you need to implement generation of id's yourself!
+               $MAXLOOPS = 100;
+               //$this->debug=1;
+               while (--$MAXLOOPS>=0) {
+                       @($num = $this->GetOne("select id from $seq"));
+                       if ($num === false) {
+                               $this->Execute(sprintf($this->_genSeqSQL ,$seq));       
+                               $start -= 1;
+                               $num = '0';
+                               $ok = $this->Execute("insert into $seq values($start)");
+                               if (!$ok) return false;
+                       } 
+                       $this->Execute("update $seq set id=id+1 where id=$num");
+                       
+                       if ($this->affected_rows() > 0) {
+                               $num += 1;
+                               $this->genID = $num;
+                               return $num;
+                       }
+               }
+               if ($fn = $this->raiseErrorFn) {
+                       $fn($this->databaseType,'GENID',-32000,"Unable to generate unique id after $MAXLOOPS attempts",$seq,$num);
+               }
+               return false;
+       }
+
+       function CreateSequence($seqname='adodbseq',$start=1)
+       {
+               if (empty($this->_genSeqSQL)) return false;
+               $ok = $this->Execute(sprintf($this->_genSeqSQL,$seqname));
+               if (!$ok) return false;
+               $start -= 1;
+               return $this->Execute("insert into $seqname values($start)");
+       }
+       
+       var $_dropSeqSQL = 'drop table %s';
+       function DropSequence($seqname)
+       {
+               if (empty($this->_dropSeqSQL)) return false;
+               return $this->Execute(sprintf($this->_dropSeqSQL,$seqname));
+       }
+       
+       // returns true or false
+       function _close()
+       {
+               //return @sqlite3_close($this->_connectionID);**change
+               return $this->_connectionID->close();
+       }
+
+       function MetaIndexes($table, $primary = FALSE, $owner=false, $owner = false)
+       {
+               $false = false;
+               // save old fetch mode
+        global $ADODB_FETCH_MODE;
+        $save = $ADODB_FETCH_MODE;
+        $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+        if ($this->fetchMode !== FALSE) {
+               $savem = $this->SetFetchMode(FALSE);
+        }
+               $SQL=sprintf("SELECT name,sql FROM sqlite_master WHERE type='index' AND tbl_name='%s'", strtolower($table));
+        $rs = $this->Execute($SQL);
+        if (!is_object($rs)) {
+                       if (isset($savem)) 
+                               $this->SetFetchMode($savem);
+                       $ADODB_FETCH_MODE = $save;
+            return $false;
+        }
+
+               $indexes = array ();
+               while ($row = $rs->FetchRow()) {
+                       if ($primary && preg_match("/primary/i",$row[1]) == 0) continue;
+            if (!isset($indexes[$row[0]])) {
+
+                       $indexes[$row[0]] = array(
+                                  'unique' => preg_match("/unique/i",$row[1]),
+                                  'columns' => array());
+                       }
+                       /**
+                         * There must be a more elegant way of doing this,
+                         * the index elements appear in the SQL statement
+                         * in cols[1] between parentheses
+                         * e.g CREATE UNIQUE INDEX ware_0 ON warehouse (org,warehouse)
+                         */
+                       $cols = explode("(",$row[1]);
+                       $cols = explode(")",$cols[1]);
+                       array_pop($cols);
+                       $indexes[$row[0]]['columns'] = $cols;
+               }
+               if (isset($savem)) { 
+            $this->SetFetchMode($savem);
+                       $ADODB_FETCH_MODE = $save;
+               }
+        return $indexes;
+       }
+
+}
+
+/*--------------------------------------------------------------------------------------
+                Class Name: Recordset
+--------------------------------------------------------------------------------------*/
+
+//class ADORecordset_sqlite extends ADORecordSet {**change
+class ADORecordset_sqlite3 extends ADORecordSet {
+
+       //var $databaseType = "sqlite";**change
+       var $databaseType = "sqlite3";
+       var $bind = false;
+
+       //function ADORecordset_sqlite($queryID,$mode=false)**change
+       function ADORecordset_sqlite3($queryID,$mode=false)
+       {
+               
+               if ($mode === false) { 
+                       global $ADODB_FETCH_MODE;
+                       $mode = $ADODB_FETCH_MODE;
+               }
+               switch($mode) {
+               //case ADODB_FETCH_NUM: $this->fetchMode = SQLITE_NUM; break;**change
+               case ADODB_FETCH_NUM: $this->fetchMode = SQLITE3_NUM; break;
+               //case ADODB_FETCH_ASSOC: $this->fetchMode = SQLITE_ASSOC; break;**change
+               case ADODB_FETCH_ASSOC: $this->fetchMode = SQLITE3_ASSOC; break;
+               //default: $this->fetchMode = SQLITE_BOTH; break;**change
+               default: $this->fetchMode = SQLITE3_BOTH; break;
+               }
+               $this->adodbFetchMode = $mode;
+               
+               $this->_queryID = $queryID;
+       
+               $this->_inited = true;
+               $this->fields = array();
+               if ($queryID) {
+                       $this->_currentRow = 0;
+                       $this->EOF = !$this->_fetch();
+                       @$this->_initrs();
+               } else {
+                       $this->_numOfRows = 0;
+                       $this->_numOfFields = 0;
+                       $this->EOF = true;
+               }
+               
+               return $this->_queryID;
+       }
+
+
+       function FetchField($fieldOffset = -1)
+       {
+               $fld = new ADOFieldObject;
+               //$fld->name = sqlite3_field_name($this->_queryID, $fieldOffset);**change
+               $fld->name->columnName($this->_queryID, $fieldOffset);
+               $fld->type = 'VARCHAR';
+               $fld->max_length = -1;
+               return $fld;
+       }
+       
+   function _initrs()
+   {
+               //$this->_numOfRows = @sqlite_num_rows($this->_queryID); **tochange but sqlite3 doesn't implement this!
+               $this->_numOfRows = 1;
+               //$this->_numOfFields = @sqlite3_num_fields($this->_queryID);**change
+               $this->_numOfFields = $this->_queryID->numColumns();
+               
+   }
+
+       function Fields($colname)
+       {
+               //if ($this->fetchMode != SQLITE_NUM) return $this->fields[$colname];**change
+               if ($this->fetchMode != SQLITE3_NUM) return $this->fields[$colname];
+               if (!$this->bind) {
+                       $this->bind = array();
+                       for ($i=0; $i < $this->_numOfFields; $i++) {
+                               $o = $this->FetchField($i);
+                               $this->bind[strtoupper($o->name)] = $i;
+                       }
+               }
+               
+                return $this->fields[$this->bind[strtoupper($colname)]];
+       }
+       
+   function _seek($row)
+   {
+               return sqlite3_seek($this->_queryID, $row);//**tochange but sqlite3 seems not to implement seek!
+   }
+
+       function _fetch($ignore_fields=false) 
+       {
+               //$this->fields = @sqlite3_fetch_array($this->_queryID,$this->fetchMode);**change
+               $this->fields = $this->_queryID->fetchArray($this->fetchMode);
+               return !empty($this->fields);
+       }
+       
+       function _close() 
+       {
+       }
+
+}
+?>
\ No newline at end of file
index 2bdb99a..b7046ec 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license.
   Whenever there is any discrepancy between the two licenses,
   the BSD license will take precedence.
index e333f3d..1ca7da5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim. All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim. All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
index 5d2023c..384ace5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-  V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence.
index d1ccae3..59f4b08 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. 
diff --git a/lib/adodb/lang/adodb-ar.inc.php b/lib/adodb/lang/adodb-ar.inc.php
new file mode 100644 (file)
index 0000000..4b75095
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+// by "El-Shamaa, Khaled" <k.el-shamaa#cgiar.org>
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'ar',
+           DB_ERROR                    => 'ÎØÃ ÛíÑ ãÍÏÏ',
+           DB_ERROR_ALREADY_EXISTS     => 'ãæÌæÏ ãÓÈÞÇ',
+           DB_ERROR_CANNOT_CREATE      => 'áÇ íãßä ÅäÔÇÁ',
+           DB_ERROR_CANNOT_DELETE      => 'áÇ íãßä ÍÐÝ',
+           DB_ERROR_CANNOT_DROP        => 'áÇ íãßä ÍÐÝ',
+           DB_ERROR_CONSTRAINT         => 'ÚãáíÉ ÅÏÎÇá ããäæÚÉ',
+           DB_ERROR_DIVZERO            => 'ÚãáíÉ ÇáÊÞÓíã Úáì ÕÝÑ',
+           DB_ERROR_INVALID            => 'ÛíÑ ÕÍíÍ',
+           DB_ERROR_INVALID_DATE       => 'ÕíÛÉ æÞÊ Ãæ ÊÇÑíΠÛíÑ ÕÍíÍÉ',
+           DB_ERROR_INVALID_NUMBER     => 'ÕíÛÉ ÑÞã ÛíÑ ÕÍíÍÉ',
+           DB_ERROR_MISMATCH           => 'ÛíÑ ãÊØÇÈÞ',
+           DB_ERROR_NODBSELECTED       => 'áã íÊã ÅÎÊíÇÑ ÞÇÚÏÉ ÇáÈíÇäÇÊ ÈÚÏ',
+           DB_ERROR_NOSUCHFIELD        => 'áíÓ åäÇáß ÍÞá ÈåÐÇ ÇáÇÓã',
+           DB_ERROR_NOSUCHTABLE        => 'áíÓ åäÇáß ÌÏæá ÈåÐÇ ÇáÇÓã',
+           DB_ERROR_NOT_CAPABLE        => 'ÞÇÚÏÉ ÇáÈíÇäÇÊ ÇáãÑÊÈØ ÈåÇ ÛíÑ ÞÇÏÑÉ',
+           DB_ERROR_NOT_FOUND          => 'áã íÊã ÅíÌÇÏå',
+           DB_ERROR_NOT_LOCKED         => 'ÛíÑ ãÞÝæá',
+           DB_ERROR_SYNTAX             => 'ÎØÃ Ýí ÇáÕíÛÉ',
+           DB_ERROR_UNSUPPORTED        => 'ÛíÑ ãÏÚæã',
+           DB_ERROR_VALUE_COUNT_ON_ROW => 'ÚÏÏ ÇáÞíã Ýí ÇáÓÌá',
+           DB_ERROR_INVALID_DSN        => 'DSN ÛíÑ ÕÍíÍ',
+           DB_ERROR_CONNECT_FAILED     => 'ÝÔá ÚãáíÉ ÇáÅÊÕÇá',
+           0                          => 'áíÓ åäÇáß ÃÎØÇÁ', // DB_OK
+           DB_ERROR_NEED_MORE_DATA     => 'ÇáÈíÇäÇÊ ÇáãÒæÏÉ ÛíÑ ßÇÝíÉ',
+           DB_ERROR_EXTENSION_NOT_FOUND=> 'áã íÊã ÅíÌÇÏ ÇáÅÖÇÝÉ ÇáãÊÚáÞÉ',
+           DB_ERROR_NOSUCHDB           => 'áíÓ åäÇáß ÞÇÚÏÉ ÈíÇäÇÊ ÈåÐÇ ÇáÇÓã',
+           DB_ERROR_ACCESS_VIOLATION   => 'ÓãÇÍíÇÊ ÛíÑ ßÇÝíÉ'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-bg.inc.php b/lib/adodb/lang/adodb-bg.inc.php
new file mode 100644 (file)
index 0000000..ee307c1
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/*
+       Bulgarian language, v1.0, 25.03.2004, encoding by Windows-1251 charset
+       contributed by Valentin Sheiretsky <valio#valio.eu.org>
+*/
+
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'bg',
+            DB_ERROR                    => 'íåèçâåñòíà ãðåøêà',
+            DB_ERROR_ALREADY_EXISTS     => 'âå÷å ñúùåñòâóâà',
+            DB_ERROR_CANNOT_CREATE      => 'íå ìîæå äà áúäå ñúçäàäåíà',
+            DB_ERROR_CANNOT_DELETE      => 'íå ìîæå äà áúäå èçòðèòà',
+            DB_ERROR_CANNOT_DROP        => 'íå ìîæå äà áúäå óíèùîæåíà',
+            DB_ERROR_CONSTRAINT         => 'íàðóøåíî óñëîâèå',
+            DB_ERROR_DIVZERO            => 'äåëåíèå íà íóëà',
+            DB_ERROR_INVALID            => 'íåïðàâèëíî',
+            DB_ERROR_INVALID_DATE       => 'íåêîðåêòíà äàòà èëè ÷àñ',
+            DB_ERROR_INVALID_NUMBER     => 'íåâàëèäåí íîìåð',
+            DB_ERROR_MISMATCH           => 'ïîãðåøíà óïîòðåáà',
+            DB_ERROR_NODBSELECTED       => 'íå å èçáðàíà áàçà äàííè',
+            DB_ERROR_NOSUCHFIELD        => 'íåñúùåñòâóâàùî ïîëå',
+            DB_ERROR_NOSUCHTABLE        => 'íåñúùåñòâóâàùà òàáëèöà',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend not capable',
+            DB_ERROR_NOT_FOUND          => 'íå å íàìåðåíà',
+            DB_ERROR_NOT_LOCKED         => 'íå å çàêëþ÷åíà',
+            DB_ERROR_SYNTAX             => 'ãðåøåí ñèíòàêñèñ',
+            DB_ERROR_UNSUPPORTED        => 'íå ñå ïîääúðæà',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'íåêîðåêòåí áðîé êîëîíè â ðåäà',
+            DB_ERROR_INVALID_DSN        => 'íåâàëèäåí DSN',
+            DB_ERROR_CONNECT_FAILED     => 'âðúçêàòà íå ìîæå äà áúäå îñúùåñòâåíà',
+            0                          => 'íÿìà ãðåøêè', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'ïðåäîñòàâåíèòå äàííè ñà íåäîñòàòú÷íè',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'ðàçøèðåíèåòî íå å íàìåðåíî',
+            DB_ERROR_NOSUCHDB           => 'íåñúùåñòâóâàùà áàçà äàííè',
+            DB_ERROR_ACCESS_VIOLATION   => 'íÿìàòå äîñòàòú÷íî ïðàâà'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-bgutf8.inc.php b/lib/adodb/lang/adodb-bgutf8.inc.php
new file mode 100644 (file)
index 0000000..5281ed5
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/*
+       Bulgarian language, v1.0, 25.03.2004, encoding by UTF-8 charset
+       contributed by Valentin Sheiretsky <valio#valio.eu.org>
+*/
+
+$ADODB_LANG_ARRAY = array (
+            'LANG'                      => 'bgutf8',
+            DB_ERROR                    => 'неизвестна грешка',
+            DB_ERROR_ALREADY_EXISTS     => 'вече съществува',
+            DB_ERROR_CANNOT_CREATE      => 'не може да бъде създадена',
+            DB_ERROR_CANNOT_DELETE      => 'не може да бъде изтрита',
+            DB_ERROR_CANNOT_DROP        => 'не може да бъде унищожена',
+            DB_ERROR_CONSTRAINT         => 'нарушено условие',
+            DB_ERROR_DIVZERO            => 'деление на нула',
+            DB_ERROR_INVALID            => 'неправилно',
+            DB_ERROR_INVALID_DATE       => 'некоректна дата или час',
+            DB_ERROR_INVALID_NUMBER     => 'невалиден номер',
+            DB_ERROR_MISMATCH           => 'погрешна употреба',
+            DB_ERROR_NODBSELECTED       => 'не е избрана база данни',
+            DB_ERROR_NOSUCHFIELD        => 'несъществуващо поле',
+            DB_ERROR_NOSUCHTABLE        => 'несъществуваща таблица',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend not capable',
+            DB_ERROR_NOT_FOUND          => 'не е намерена',
+            DB_ERROR_NOT_LOCKED         => 'не е заключена',
+            DB_ERROR_SYNTAX             => 'грешен синтаксис',
+            DB_ERROR_UNSUPPORTED        => 'не се поддържа',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'некоректен брой колони в реда',
+            DB_ERROR_INVALID_DSN        => 'невалиден DSN',
+            DB_ERROR_CONNECT_FAILED     => 'връзката не може да бъде осъществена',
+            0                          => 'няма грешки', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'предоставените данни са недостатъчни',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'разширението не е намерено',
+            DB_ERROR_NOSUCHDB           => 'несъществуваща база данни',
+            DB_ERROR_ACCESS_VIOLATION   => 'нямате достатъчно права'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-ca.inc.php b/lib/adodb/lang/adodb-ca.inc.php
new file mode 100644 (file)
index 0000000..3640ebd
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+// Catalan language
+// contributed by "Josep Lladonosa" jlladono#pie.xtec.es
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'ca',
+            DB_ERROR                    => 'error desconegut',
+            DB_ERROR_ALREADY_EXISTS     => 'ja existeix',
+            DB_ERROR_CANNOT_CREATE      => 'no es pot crear',
+            DB_ERROR_CANNOT_DELETE      => 'no es pot esborrar',
+            DB_ERROR_CANNOT_DROP        => 'no es pot eliminar',
+            DB_ERROR_CONSTRAINT         => 'violació de constraint',
+            DB_ERROR_DIVZERO            => 'divisió per zero',
+            DB_ERROR_INVALID            => 'no és vàlid',
+            DB_ERROR_INVALID_DATE       => 'la data o l\'hora no són vàlides',
+            DB_ERROR_INVALID_NUMBER     => 'el nombre no és vàlid',
+            DB_ERROR_MISMATCH           => 'no hi ha coincidència',
+            DB_ERROR_NODBSELECTED       => 'cap base de dades seleccionada',
+            DB_ERROR_NOSUCHFIELD        => 'camp inexistent',
+            DB_ERROR_NOSUCHTABLE        => 'taula inexistent',
+            DB_ERROR_NOT_CAPABLE        => 'l\'execució secundària de DB no pot',
+            DB_ERROR_NOT_FOUND          => 'no trobat',
+            DB_ERROR_NOT_LOCKED         => 'no blocat',
+            DB_ERROR_SYNTAX             => 'error de sintaxi',
+            DB_ERROR_UNSUPPORTED        => 'no suportat',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'el nombre de columnes no coincideix amb el nombre de valors en la fila',
+            DB_ERROR_INVALID_DSN        => 'el DSN no és vàlid',
+            DB_ERROR_CONNECT_FAILED     => 'connexió fallida',
+            0                         => 'cap error', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'les dades subministrades són insuficients',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'extensió no trobada',
+            DB_ERROR_NOSUCHDB           => 'base de dades inexistent',
+            DB_ERROR_ACCESS_VIOLATION   => 'permisos insuficients'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-cn.inc.php b/lib/adodb/lang/adodb-cn.inc.php
new file mode 100644 (file)
index 0000000..b108604
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+// Chinese language file contributed by "Cuiyan (cysoft)" cysoft#php.net.
+// Encode by GB2312
+// Simplified Chinese
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'cn',
+            DB_ERROR                    => 'δ֪����',
+            DB_ERROR_ALREADY_EXISTS     => '�Ѿ�����',
+            DB_ERROR_CANNOT_CREATE      => '���ܴ���',
+            DB_ERROR_CANNOT_DELETE      => '����ɾ��',
+            DB_ERROR_CANNOT_DROP        => '���ܶ���',
+            DB_ERROR_CONSTRAINT         => 'Լ������',
+            DB_ERROR_DIVZERO            => '��0��',
+            DB_ERROR_INVALID            => '��Ч',
+            DB_ERROR_INVALID_DATE       => '��Ч�����ڻ���ʱ��',
+            DB_ERROR_INVALID_NUMBER     => '��Ч������',
+            DB_ERROR_MISMATCH           => '��ƥ��',
+            DB_ERROR_NODBSELECTED       => 'û����ݿⱻѡ��',
+            DB_ERROR_NOSUCHFIELD        => 'û����Ӧ���ֶ�',
+            DB_ERROR_NOSUCHTABLE        => 'û����Ӧ�ı�',
+            DB_ERROR_NOT_CAPABLE        => '��ݿ��̨������',
+            DB_ERROR_NOT_FOUND          => 'û�з���',
+            DB_ERROR_NOT_LOCKED         => 'û�б���',
+            DB_ERROR_SYNTAX             => '�﷨����',
+            DB_ERROR_UNSUPPORTED        => '��֧��',
+            DB_ERROR_VALUE_COUNT_ON_ROW => '�������ۼ�ֵ',
+            DB_ERROR_INVALID_DSN        => '��Ч�����Դ (DSN)',
+            DB_ERROR_CONNECT_FAILED     => '����ʧ��',
+            0                         => 'û�д���', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => '�ṩ����ݲ��ܷ��Ҫ��',
+            DB_ERROR_EXTENSION_NOT_FOUND=> '��չû�б�����',
+            DB_ERROR_NOSUCHDB           => 'û����Ӧ����ݿ�',
+            DB_ERROR_ACCESS_VIOLATION   => 'û�к��ʵ�Ȩ��'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-cz.inc.php b/lib/adodb/lang/adodb-cz.inc.php
new file mode 100644 (file)
index 0000000..e16a22d
--- /dev/null
@@ -0,0 +1,40 @@
+<?php
+
+# Czech language, encoding by ISO 8859-2 charset (Iso Latin-2)
+# For convert to MS Windows use shell command:
+#    iconv -f ISO_8859-2 -t CP1250 < adodb-cz.inc.php
+# For convert to ASCII use shell command:
+#    unaccent ISO_8859-2 < adodb-cz.inc.php
+# v1.0, 19.06.2003 Kamil Jakubovic <jake@host.sk>
+
+$ADODB_LANG_ARRAY = array (
+            'LANG'                      => 'cz',
+            DB_ERROR                    => 'nezn�m� chyba',
+            DB_ERROR_ALREADY_EXISTS     => 'ji? existuje',
+            DB_ERROR_CANNOT_CREATE      => 'nelze vytvo?it',
+            DB_ERROR_CANNOT_DELETE      => 'nelze smazat',
+            DB_ERROR_CANNOT_DROP        => 'nelze odstranit',
+            DB_ERROR_CONSTRAINT         => 'poru?en� omezuj�c� podm�nky',
+            DB_ERROR_DIVZERO            => 'd?len� nulou',
+            DB_ERROR_INVALID            => 'neplatn�',
+            DB_ERROR_INVALID_DATE       => 'neplatn� datum nebo ?as',
+            DB_ERROR_INVALID_NUMBER     => 'neplatn� ?�slo',
+            DB_ERROR_MISMATCH           => 'nesouhlas�',
+            DB_ERROR_NODBSELECTED       => '?�dn� datab�ze nen� vybr�na',
+            DB_ERROR_NOSUCHFIELD        => 'pole nenalezeno',
+            DB_ERROR_NOSUCHTABLE        => 'tabulka nenalezena',
+            DB_ERROR_NOT_CAPABLE        => 'nepodporov�no',
+            DB_ERROR_NOT_FOUND          => 'nenalezeno',
+            DB_ERROR_NOT_LOCKED         => 'nezam?eno',
+            DB_ERROR_SYNTAX             => 'syntaktick� chyba',
+            DB_ERROR_UNSUPPORTED        => 'nepodporov�no',
+            DB_ERROR_VALUE_COUNT_ON_ROW => '',
+            DB_ERROR_INVALID_DSN        => 'neplatn� DSN',
+            DB_ERROR_CONNECT_FAILED     => 'p?ipojen� selhalo',
+            0                          => 'bez chyb', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'm�lo zdrojov�ch dat',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'roz?�?en� nenalezeno',
+            DB_ERROR_NOSUCHDB           => 'datab�ze neexistuje',
+            DB_ERROR_ACCESS_VIOLATION   => 'nedostate?n� pr�va'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-da.inc.php b/lib/adodb/lang/adodb-da.inc.php
new file mode 100644 (file)
index 0000000..ca0e72d
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+// Arne Eckmann bananstat#users.sourceforge.net
+$ADODB_LANG_ARRAY = array (
+           'LANG'                      => 'da',
+            DB_ERROR                    => 'ukendt fejl',
+            DB_ERROR_ALREADY_EXISTS     => 'eksisterer allerede',
+            DB_ERROR_CANNOT_CREATE      => 'kan ikke oprette',
+            DB_ERROR_CANNOT_DELETE      => 'kan ikke slette',
+            DB_ERROR_CANNOT_DROP        => 'kan ikke droppe',
+            DB_ERROR_CONSTRAINT         => 'begr&aelig;nsning kr&aelig;nket',
+            DB_ERROR_DIVZERO            => 'division med nul',
+            DB_ERROR_INVALID            => 'ugyldig',
+            DB_ERROR_INVALID_DATE       => 'ugyldig dato eller klokkeslet',
+            DB_ERROR_INVALID_NUMBER     => 'ugyldigt tal',
+            DB_ERROR_MISMATCH           => 'mismatch',
+            DB_ERROR_NODBSELECTED       => 'ingen database valgt',
+            DB_ERROR_NOSUCHFIELD        => 'felt findes ikke',
+            DB_ERROR_NOSUCHTABLE        => 'tabel findes ikke',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend opgav',
+            DB_ERROR_NOT_FOUND          => 'ikke fundet',
+            DB_ERROR_NOT_LOCKED         => 'ikke l&aring;st',
+            DB_ERROR_SYNTAX             => 'syntaksfejl',
+            DB_ERROR_UNSUPPORTED        => 'ikke underst&oslash;ttet',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'resulterende antal felter svarer ikke til foresp&oslash;rgslens antal felter',
+            DB_ERROR_INVALID_DSN        => 'ugyldig DSN',
+            DB_ERROR_CONNECT_FAILED     => 'tilslutning mislykkedes',
+            0                          => 'ingen fejl', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'utilstr&aelig;kkelige data angivet',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'udvidelse ikke fundet',
+            DB_ERROR_NOSUCHDB           => 'database ikke fundet',
+            DB_ERROR_ACCESS_VIOLATION   => 'utilstr&aelig;kkelige rettigheder'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-de.inc.php b/lib/adodb/lang/adodb-de.inc.php
new file mode 100644 (file)
index 0000000..44c57e9
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+// contributed by "Heinz Hombergs" <opn@hhombergs.de>
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'de',
+                       DB_ERROR                    => 'Unbekannter Fehler',
+            DB_ERROR_ALREADY_EXISTS     => 'existiert bereits',
+            DB_ERROR_CANNOT_CREATE      => 'kann nicht erstellen',
+            DB_ERROR_CANNOT_DELETE      => 'kann nicht l&ouml;schen',
+            DB_ERROR_CANNOT_DROP        => 'Tabelle oder Index konnte nicht gel&ouml;scht werden',
+            DB_ERROR_CONSTRAINT         => 'Constraint Verletzung',
+            DB_ERROR_DIVZERO            => 'Division durch Null',
+            DB_ERROR_INVALID            => 'ung&uml;ltig',
+            DB_ERROR_INVALID_DATE       => 'ung&uml;ltiges Datum oder Zeit',
+            DB_ERROR_INVALID_NUMBER     => 'ung&uml;ltige Zahl',
+            DB_ERROR_MISMATCH           => 'Unvertr&auml;glichkeit',
+            DB_ERROR_NODBSELECTED       => 'keine Dantebank ausgew&auml;hlt',
+            DB_ERROR_NOSUCHFIELD        => 'Feld nicht vorhanden',
+            DB_ERROR_NOSUCHTABLE        => 'Tabelle nicht vorhanden',
+            DB_ERROR_NOT_CAPABLE        => 'Funktion nicht installiert',
+            DB_ERROR_NOT_FOUND          => 'nicht gefunden',
+            DB_ERROR_NOT_LOCKED         => 'nicht gesperrt',
+            DB_ERROR_SYNTAX             => 'Syntaxfehler',
+            DB_ERROR_UNSUPPORTED        => 'nicht Unterst&uml;tzt',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'Anzahl der zur&uml;ckgelieferten Felder entspricht nicht der Anzahl der Felder in der Abfrage',
+            DB_ERROR_INVALID_DSN        => 'ung&uml;ltiger DSN',
+            DB_ERROR_CONNECT_FAILED     => 'Verbindung konnte nicht hergestellt werden',
+            0                         => 'kein Fehler', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'Nicht gen&uml;gend Daten geliefert',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'erweiterung nicht gefunden',
+            DB_ERROR_NOSUCHDB           => 'keine Datenbank',
+            DB_ERROR_ACCESS_VIOLATION   => 'ungen&uml;gende Rechte'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-es.inc.php b/lib/adodb/lang/adodb-es.inc.php
new file mode 100644 (file)
index 0000000..1e0afbb
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+// contributed by "Horacio Degiorgi" <horaciod@codigophp.com>
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'es',
+            DB_ERROR                    => 'error desconocido',
+            DB_ERROR_ALREADY_EXISTS     => 'ya existe',
+            DB_ERROR_CANNOT_CREATE      => 'imposible crear',
+            DB_ERROR_CANNOT_DELETE      => 'imposible borrar',
+            DB_ERROR_CANNOT_DROP        => 'imposible hacer drop',
+            DB_ERROR_CONSTRAINT         => 'violacion de constraint',
+            DB_ERROR_DIVZERO            => 'division por cero',
+            DB_ERROR_INVALID            => 'invalido',
+            DB_ERROR_INVALID_DATE       => 'fecha u hora invalida',
+            DB_ERROR_INVALID_NUMBER     => 'numero invalido',
+            DB_ERROR_MISMATCH           => 'error',
+            DB_ERROR_NODBSELECTED       => 'no hay base de datos seleccionada',
+            DB_ERROR_NOSUCHFIELD        => 'campo invalido',
+            DB_ERROR_NOSUCHTABLE        => 'tabla no existe',
+            DB_ERROR_NOT_CAPABLE        => 'capacidad invalida para esta DB',
+            DB_ERROR_NOT_FOUND          => 'no encontrado',
+            DB_ERROR_NOT_LOCKED         => 'no bloqueado',
+            DB_ERROR_SYNTAX             => 'error de sintaxis',
+            DB_ERROR_UNSUPPORTED        => 'no soportado',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'la cantidad de columnas no corresponden a la cantidad de valores',
+            DB_ERROR_INVALID_DSN        => 'DSN invalido',
+            DB_ERROR_CONNECT_FAILED     => 'fallo la conexion',
+            0                         => 'sin error', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'insuficientes datos',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'extension no encontrada',
+            DB_ERROR_NOSUCHDB           => 'base de datos no encontrada',
+            DB_ERROR_ACCESS_VIOLATION   => 'permisos insuficientes'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-esperanto.inc.php b/lib/adodb/lang/adodb-esperanto.inc.php
new file mode 100644 (file)
index 0000000..16ca00e
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+// Vivu Esperanto cxiam! 
+// Traduko fare de Antono Vasiljev (anders[#]brainactive.org)
+
+$ADODB_LANG_ARRAY = array (
+             'LANG'                      => 'eo',
+            DB_ERROR                    => 'nekonata eraro',
+            DB_ERROR_ALREADY_EXISTS     => 'jam ekzistas',
+            DB_ERROR_CANNOT_CREATE      => 'maleblas krei',
+            DB_ERROR_CANNOT_DELETE      => 'maleblas elimini',
+            DB_ERROR_CANNOT_DROP        => 'maleblas elimini (drop)',
+            DB_ERROR_CONSTRAINT         => 'rompo de kondicxoj de provo',
+            DB_ERROR_DIVZERO            => 'divido per 0 (nul)',
+            DB_ERROR_INVALID            => 'malregule',
+            DB_ERROR_INVALID_DATE       => 'malregula dato kaj tempo',
+            DB_ERROR_INVALID_NUMBER     => 'malregula nombro',
+            DB_ERROR_MISMATCH           => 'eraro',
+            DB_ERROR_NODBSELECTED       => 'datumbazo ne elektita',
+            DB_ERROR_NOSUCHFIELD        => 'ne ekzistas kampo',
+            DB_ERROR_NOSUCHTABLE        => 'ne ekzistas tabelo',
+            DB_ERROR_NOT_CAPABLE        => 'DBMS ne povas',
+            DB_ERROR_NOT_FOUND          => 'ne trovita',
+            DB_ERROR_NOT_LOCKED         => 'ne blokita',
+            DB_ERROR_SYNTAX             => 'sintaksa eraro',
+            DB_ERROR_UNSUPPORTED        => 'ne apogata',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'nombrilo de valoroj en linio',
+            DB_ERROR_INVALID_DSN        => 'malregula DSN-o',
+            DB_ERROR_CONNECT_FAILED     => 'konekto malsukcesa',
+            0                               => 'cxio bone', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'ne suficxe da datumo',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'etendo ne trovita',
+            DB_ERROR_NOSUCHDB           => 'datumbazo ne ekzistas',
+            DB_ERROR_ACCESS_VIOLATION   => 'ne suficxe da rajto por atingo'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-fa.inc.php b/lib/adodb/lang/adodb-fa.inc.php
new file mode 100644 (file)
index 0000000..a58a21c
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+
+/* Farsi - by "Peyman Hooshmandi Raad" <phooshmand#gmail.com> */
+
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'fa',
+            DB_ERROR                    => 'خطای ناشناخته',
+            DB_ERROR_ALREADY_EXISTS     => 'وجود دارد',
+            DB_ERROR_CANNOT_CREATE      => 'امکان create وجود ندارد',
+            DB_ERROR_CANNOT_DELETE      => 'امکان حذف وجود ندارد',
+            DB_ERROR_CANNOT_DROP        => 'امکان drop وجود ندارد',
+            DB_ERROR_CONSTRAINT         => 'نقض شرط',
+            DB_ERROR_DIVZERO            => 'تقسیم بر صفر',
+            DB_ERROR_INVALID            => 'نامعتبر',
+            DB_ERROR_INVALID_DATE       => 'زمان یا تاریخ نامعتبر',
+            DB_ERROR_INVALID_NUMBER     => 'عدد نامعتبر',
+            DB_ERROR_MISMATCH           => 'عدم مطابقت',
+            DB_ERROR_NODBSELECTED       => 'بانک اطلاعاتی انتخاب نشده است',
+            DB_ERROR_NOSUCHFIELD        => 'چنین ستونی وجود ندارد',
+            DB_ERROR_NOSUCHTABLE        => 'چنین جدولی وجود ندارد',
+            DB_ERROR_NOT_CAPABLE        => 'backend بانک اطلاعاتی قادر نیست',
+            DB_ERROR_NOT_FOUND          => 'پیدا نشد',
+            DB_ERROR_NOT_LOCKED         => 'قفل نشده',
+            DB_ERROR_SYNTAX             => 'خطای دستوری',
+            DB_ERROR_UNSUPPORTED        => 'پشتیبانی نمی شود',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'شمارش مقادیر روی ردیف',
+            DB_ERROR_INVALID_DSN        => 'DSN نامعتبر',
+            DB_ERROR_CONNECT_FAILED     => 'ارتباط برقرار نشد',
+            0                         => 'بدون خطا', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'داده ناکافی است',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'extension پیدا نشد',
+            DB_ERROR_NOSUCHDB           => 'چنین بانک اطلاعاتی وجود ندارد',
+            DB_ERROR_ACCESS_VIOLATION   => 'حق دسترسی ناکافی'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-fr.inc.php b/lib/adodb/lang/adodb-fr.inc.php
new file mode 100644 (file)
index 0000000..11127cd
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+
+$ADODB_LANG_ARRAY = array (
+       'LANG'                      => 'fr',
+       DB_ERROR                    => 'erreur inconnue',
+       DB_ERROR_ALREADY_EXISTS     => 'existe d&eacute;j&agrave;',
+       DB_ERROR_CANNOT_CREATE      => 'cr&eacute;tion impossible',
+       DB_ERROR_CANNOT_DELETE      => 'effacement impossible',
+       DB_ERROR_CANNOT_DROP        => 'suppression impossible',
+       DB_ERROR_CONSTRAINT         => 'violation de contrainte',
+       DB_ERROR_DIVZERO            => 'division par z&eacute;ro',
+       DB_ERROR_INVALID            => 'invalide',
+       DB_ERROR_INVALID_DATE       => 'date ou heure invalide',
+       DB_ERROR_INVALID_NUMBER     => 'nombre invalide',
+       DB_ERROR_MISMATCH           => 'erreur de concordance',
+       DB_ERROR_NODBSELECTED       => 'pas de base de donn&eacute;ess&eacute;lectionn&eacute;e',
+       DB_ERROR_NOSUCHFIELD        => 'nom de colonne invalide',
+       DB_ERROR_NOSUCHTABLE        => 'table ou vue inexistante',
+       DB_ERROR_NOT_CAPABLE        => 'fonction optionnelle non install&eacute;e',
+       DB_ERROR_NOT_FOUND          => 'pas trouv&eacute;',
+       DB_ERROR_NOT_LOCKED         => 'non verrouill&eacute;',
+       DB_ERROR_SYNTAX             => 'erreur de syntaxe',
+       DB_ERROR_UNSUPPORTED        => 'non support&eacute;',
+       DB_ERROR_VALUE_COUNT_ON_ROW => 'valeur ins&eacute;r&eacute;e trop grande pour colonne',
+       DB_ERROR_INVALID_DSN        => 'DSN invalide',
+       DB_ERROR_CONNECT_FAILED     => '&eacute;chec &agrave; la connexion',
+       0                        => "pas d'erreur", // DB_OK
+       DB_ERROR_NEED_MORE_DATA     => 'donn&eacute;es fournies insuffisantes',
+       DB_ERROR_EXTENSION_NOT_FOUND=> 'extension non trouv&eacute;e',
+       DB_ERROR_NOSUCHDB           => 'base de donn&eacute;es inconnue',
+       DB_ERROR_ACCESS_VIOLATION   => 'droits insuffisants'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-hu.inc.php b/lib/adodb/lang/adodb-hu.inc.php
new file mode 100644 (file)
index 0000000..d6f0ef8
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+# Hungarian language, encoding by ISO 8859-2 charset (Iso Latin-2)
+# Halászvári Gábor <g.halaszvari#portmax.hu>
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'hu',
+            DB_ERROR                    => 'ismeretlen hiba',
+            DB_ERROR_ALREADY_EXISTS     => 'már létezik',
+            DB_ERROR_CANNOT_CREATE      => 'nem sikerült létrehozni',
+            DB_ERROR_CANNOT_DELETE      => 'nem sikerült törölni',
+            DB_ERROR_CANNOT_DROP        => 'nem sikerült eldobni',
+            DB_ERROR_CONSTRAINT         => 'szabályok megszegése',
+            DB_ERROR_DIVZERO            => 'osztás nullával',
+            DB_ERROR_INVALID            => 'érvénytelen',
+            DB_ERROR_INVALID_DATE       => 'érvénytelen dátum vagy idõ',
+            DB_ERROR_INVALID_NUMBER     => 'érvénytelen szám',
+            DB_ERROR_MISMATCH           => 'nem megfelelõ',
+            DB_ERROR_NODBSELECTED       => 'nincs kiválasztott adatbázis',
+            DB_ERROR_NOSUCHFIELD        => 'nincs ilyen mezõ',
+            DB_ERROR_NOSUCHTABLE        => 'nincs ilyen tábla',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend nem támogatja',
+            DB_ERROR_NOT_FOUND          => 'nem található',
+            DB_ERROR_NOT_LOCKED         => 'nincs lezárva',
+            DB_ERROR_SYNTAX             => 'szintaktikai hiba',
+            DB_ERROR_UNSUPPORTED        => 'nem támogatott',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'soron végzett érték számlálás',
+            DB_ERROR_INVALID_DSN        => 'hibás DSN',
+            DB_ERROR_CONNECT_FAILED     => 'sikertelen csatlakozás',
+            0                         => 'nincs hiba', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'túl kevés az adat',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'bõvítmény nem található',
+            DB_ERROR_NOSUCHDB           => 'nincs ilyen adatbázis',
+            DB_ERROR_ACCESS_VIOLATION   => 'nincs jogosultság'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-it.inc.php b/lib/adodb/lang/adodb-it.inc.php
new file mode 100644 (file)
index 0000000..ac5cc5a
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+// Italian language file contributed by Tiraboschi Massimiliano aka TiMax  
+// www.maxdev.com  timax@maxdev.com
+$ADODB_LANG_ARRAY = array (
+            'LANG'                      => 'it',
+            DB_ERROR                    => 'errore sconosciuto',
+            DB_ERROR_ALREADY_EXISTS     => 'esiste gi&agrave;',
+            DB_ERROR_CANNOT_CREATE      => 'non posso creare',
+            DB_ERROR_CANNOT_DELETE      => 'non posso cancellare',
+            DB_ERROR_CANNOT_DROP        => 'non posso eliminare',
+            DB_ERROR_CONSTRAINT         => 'violazione constraint',
+            DB_ERROR_DIVZERO            => 'divisione per zero',
+            DB_ERROR_INVALID            => 'non valido',
+            DB_ERROR_INVALID_DATE       => 'data od ora non valida',
+            DB_ERROR_INVALID_NUMBER     => 'numero non valido',
+            DB_ERROR_MISMATCH           => 'diversi',
+            DB_ERROR_NODBSELECTED       => 'nessun database selezionato',
+            DB_ERROR_NOSUCHFIELD        => 'nessun campo trovato',
+            DB_ERROR_NOSUCHTABLE        => 'nessuna tabella trovata',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend non abilitato',
+            DB_ERROR_NOT_FOUND          => 'non trovato',
+            DB_ERROR_NOT_LOCKED         => 'non bloccato',
+            DB_ERROR_SYNTAX             => 'errore di sintassi',
+            DB_ERROR_UNSUPPORTED        => 'non supportato',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'valore inserito troppo grande per una colonna',
+            DB_ERROR_INVALID_DSN        => 'DSN non valido',
+            DB_ERROR_CONNECT_FAILED     => 'connessione fallita',
+            0                           => 'nessun errore', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'dati inseriti insufficienti',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'estensione non trovata',
+            DB_ERROR_NOSUCHDB           => 'database non trovato',
+            DB_ERROR_ACCESS_VIOLATION   => 'permessi insufficienti'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-nl.inc.php b/lib/adodb/lang/adodb-nl.inc.php
new file mode 100644 (file)
index 0000000..abe77b5
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+// Translated by Pim Koeman (pim#wittenborg-university.com)
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'nl',
+            DB_ERROR                    => 'onbekende fout',
+            DB_ERROR_ALREADY_EXISTS     => 'bestaat al',
+            DB_ERROR_CANNOT_CREATE      => 'kan niet aanmaken',
+            DB_ERROR_CANNOT_DELETE      => 'kan niet wissen',
+            DB_ERROR_CANNOT_DROP        => 'kan niet verwijderen',
+            DB_ERROR_CONSTRAINT         => 'constraint overtreding',
+            DB_ERROR_DIVZERO            => 'poging tot delen door nul',
+            DB_ERROR_INVALID            => 'ongeldig',
+            DB_ERROR_INVALID_DATE       => 'ongeldige datum of tijd',
+            DB_ERROR_INVALID_NUMBER     => 'ongeldig nummer',
+            DB_ERROR_MISMATCH           => 'is incorrect',
+            DB_ERROR_NODBSELECTED       => 'geen database geselecteerd',
+            DB_ERROR_NOSUCHFIELD        => 'onbekend veld',
+            DB_ERROR_NOSUCHTABLE        => 'onbekende tabel',
+            DB_ERROR_NOT_CAPABLE        => 'database systeem is niet tot uitvoer in staat',
+            DB_ERROR_NOT_FOUND          => 'niet gevonden',
+            DB_ERROR_NOT_LOCKED         => 'niet vergrendeld',
+            DB_ERROR_SYNTAX             => 'syntaxis fout',
+            DB_ERROR_UNSUPPORTED        => 'niet ondersteund',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'waarde telling op rij',
+            DB_ERROR_INVALID_DSN        => 'ongeldige DSN',
+            DB_ERROR_CONNECT_FAILED     => 'connectie mislukt',
+            0                         => 'geen fout', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'onvoldoende data gegeven',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie niet gevonden',
+            DB_ERROR_NOSUCHDB           => 'onbekende database',
+            DB_ERROR_ACCESS_VIOLATION   => 'onvoldoende rechten'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-pl.inc.php b/lib/adodb/lang/adodb-pl.inc.php
new file mode 100644 (file)
index 0000000..9d9e390
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+
+// Contributed by Grzegorz Pacan <gp#dione.cc>
+
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'pl',
+            DB_ERROR                    => 'niezidentyfikowany b³±d',
+            DB_ERROR_ALREADY_EXISTS     => 'ju¿ istniej±',
+            DB_ERROR_CANNOT_CREATE      => 'nie mo¿na stworzyæ',
+            DB_ERROR_CANNOT_DELETE      => 'nie mo¿na usun±æ',
+            DB_ERROR_CANNOT_DROP        => 'nie mo¿na porzuciæ',
+            DB_ERROR_CONSTRAINT         => 'pogwa³cenie uprawnieñ',
+            DB_ERROR_DIVZERO            => 'dzielenie przez zero',
+            DB_ERROR_INVALID            => 'b³êdny',
+            DB_ERROR_INVALID_DATE       => 'b³êdna godzina lub data',
+            DB_ERROR_INVALID_NUMBER     => 'b³êdny numer',
+            DB_ERROR_MISMATCH           => 'niedopasowanie',
+            DB_ERROR_NODBSELECTED       => 'baza danych nie zosta³a wybrana',
+            DB_ERROR_NOSUCHFIELD        => 'nie znaleziono pola',
+            DB_ERROR_NOSUCHTABLE        => 'nie znaleziono tabeli',
+            DB_ERROR_NOT_CAPABLE        => 'nie zdolny',
+            DB_ERROR_NOT_FOUND          => 'nie znaleziono',
+            DB_ERROR_NOT_LOCKED         => 'nie zakmniêty',
+            DB_ERROR_SYNTAX             => 'b³±d sk³adni',
+            DB_ERROR_UNSUPPORTED        => 'nie obs³uguje',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'warto¶æ liczona w szeregu',
+            DB_ERROR_INVALID_DSN        => 'b³êdny DSN',
+            DB_ERROR_CONNECT_FAILED     => 'po³±czenie nie zosta³o zrealizowane',
+            0                         => 'brak b³êdów', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'niedostateczna ilo¶æ informacji',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'nie znaleziono rozszerzenia',
+            DB_ERROR_NOSUCHDB           => 'nie znaleziono bazy',
+            DB_ERROR_ACCESS_VIOLATION   => 'niedostateczne uprawnienia'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-pt-br.inc.php b/lib/adodb/lang/adodb-pt-br.inc.php
new file mode 100644 (file)
index 0000000..cd28f7e
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+// contributed by "Levi Fukumori" levi _AT_ fukumori _DOT_ com _DOT_ br
+// portugese (brazilian)
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'pt-br',
+            DB_ERROR                    => 'erro desconhecido',
+            DB_ERROR_ALREADY_EXISTS     => 'já existe',
+            DB_ERROR_CANNOT_CREATE      => 'impossível criar',
+            DB_ERROR_CANNOT_DELETE      => 'impossível excluír',
+            DB_ERROR_CANNOT_DROP        => 'impossível remover',
+            DB_ERROR_CONSTRAINT         => 'violação do confinamente',
+            DB_ERROR_DIVZERO            => 'divisão por zero',
+            DB_ERROR_INVALID            => 'inválido',
+            DB_ERROR_INVALID_DATE       => 'data ou hora inválida',
+            DB_ERROR_INVALID_NUMBER     => 'número inválido',
+            DB_ERROR_MISMATCH           => 'erro',
+            DB_ERROR_NODBSELECTED       => 'nenhum banco de dados selecionado',
+            DB_ERROR_NOSUCHFIELD        => 'campo inválido',
+            DB_ERROR_NOSUCHTABLE        => 'tabela inexistente',
+            DB_ERROR_NOT_CAPABLE        => 'capacidade inválida para este BD',
+            DB_ERROR_NOT_FOUND          => 'não encontrado',
+            DB_ERROR_NOT_LOCKED         => 'não bloqueado',
+            DB_ERROR_SYNTAX             => 'erro de sintaxe',
+            DB_ERROR_UNSUPPORTED        => 
+'não suportado',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'a quantidade de colunas não corresponde ao de valores',
+            DB_ERROR_INVALID_DSN        => 'DSN inválido',
+            DB_ERROR_CONNECT_FAILED     => 'falha na conexão',
+            0                          => 'sem erro', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'dados insuficientes',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'extensão não encontrada',
+            DB_ERROR_NOSUCHDB           => 'banco de dados não encontrado',
+            DB_ERROR_ACCESS_VIOLATION   => 'permissão insuficiente'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-ro.inc.php b/lib/adodb/lang/adodb-ro.inc.php
new file mode 100644 (file)
index 0000000..bcd7d13
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+
+/* Romanian - by "bogdan stefan" <sbogdan#rsb.ro> */
+
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'ro',
+            DB_ERROR                    => 'eroare necunoscuta',
+            DB_ERROR_ALREADY_EXISTS     => 'deja exista',
+            DB_ERROR_CANNOT_CREATE      => 'nu se poate creea',
+            DB_ERROR_CANNOT_DELETE      => 'nu se poate sterge',
+            DB_ERROR_CANNOT_DROP        => 'nu se poate executa drop',
+            DB_ERROR_CONSTRAINT         => 'violare de constrain',
+            DB_ERROR_DIVZERO            => 'se divide la zero',
+            DB_ERROR_INVALID            => 'invalid',
+            DB_ERROR_INVALID_DATE       => 'data sau timp invalide',
+            DB_ERROR_INVALID_NUMBER     => 'numar invalid',
+            DB_ERROR_MISMATCH           => 'nepotrivire-mismatch',
+            DB_ERROR_NODBSELECTED       => 'nu exista baza de date selectata',
+            DB_ERROR_NOSUCHFIELD        => 'camp inexistent',
+            DB_ERROR_NOSUCHTABLE        => 'tabela inexistenta',
+            DB_ERROR_NOT_CAPABLE        => 'functie optionala neinstalata',
+            DB_ERROR_NOT_FOUND          => 'negasit',
+            DB_ERROR_NOT_LOCKED         => 'neblocat',
+            DB_ERROR_SYNTAX             => 'eroare de sintaxa',
+            DB_ERROR_UNSUPPORTED        => 'nu e suportat',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'valoare prea mare pentru coloana',
+            DB_ERROR_INVALID_DSN        => 'DSN invalid',
+            DB_ERROR_CONNECT_FAILED     => 'conectare esuata',
+            0                         => 'fara eroare', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'data introduse insuficiente',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'extensie negasita',
+            DB_ERROR_NOSUCHDB           => 'nu exista baza de date',
+            DB_ERROR_ACCESS_VIOLATION   => 'permisiuni insuficiente'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-ru1251.inc.php b/lib/adodb/lang/adodb-ru1251.inc.php
new file mode 100644 (file)
index 0000000..1ccdde8
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+
+// Russian language file contributed by "Cyrill Malevanov" cyrill#malevanov.spb.ru.
+
+$ADODB_LANG_ARRAY = array (
+             'LANG'                      => 'ru1251',
+            DB_ERROR                    => '����������� ������',
+            DB_ERROR_ALREADY_EXISTS     => '��� ����������',
+            DB_ERROR_CANNOT_CREATE      => '���������� �������',
+            DB_ERROR_CANNOT_DELETE      => '���������� �������',
+            DB_ERROR_CANNOT_DROP        => '���������� ������� (drop)',
+            DB_ERROR_CONSTRAINT         => '��������� ������� ��������',
+            DB_ERROR_DIVZERO            => '������� �� 0',
+            DB_ERROR_INVALID            => '�����������',
+            DB_ERROR_INVALID_DATE       => '������������ ���� ��� �����',
+            DB_ERROR_INVALID_NUMBER     => '������������ �����',
+            DB_ERROR_MISMATCH           => '������',
+            DB_ERROR_NODBSELECTED       => '�� �� �������',
+            DB_ERROR_NOSUCHFIELD        => '�� ���������� ����',
+            DB_ERROR_NOSUCHTABLE        => '�� ���������� �������',
+            DB_ERROR_NOT_CAPABLE        => '���� �� � ���������',
+            DB_ERROR_NOT_FOUND          => '�� �������',
+            DB_ERROR_NOT_LOCKED         => '�� �������������',
+            DB_ERROR_SYNTAX             => '�������������� ������',
+            DB_ERROR_UNSUPPORTED        => '�� ��������������',
+            DB_ERROR_VALUE_COUNT_ON_ROW => '������� �������� � ������',
+            DB_ERROR_INVALID_DSN        => '������������ DSN',
+            DB_ERROR_CONNECT_FAILED     => '���������� ���������',
+            0                               => '��� ������', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => '������������� ������������ ������',
+            DB_ERROR_EXTENSION_NOT_FOUND=> '���������� �� �������',
+            DB_ERROR_NOSUCHDB           => '�� ���������� ��',
+            DB_ERROR_ACCESS_VIOLATION   => '������������ ���� �������'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-sv.inc.php b/lib/adodb/lang/adodb-sv.inc.php
new file mode 100644 (file)
index 0000000..268644a
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+// Christian Tiberg" christian@commsoft.nu
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'en',
+            DB_ERROR                    => 'Ok�nt fel',
+            DB_ERROR_ALREADY_EXISTS     => 'finns redan',
+            DB_ERROR_CANNOT_CREATE      => 'kan inte skapa',
+            DB_ERROR_CANNOT_DELETE      => 'kan inte ta bort',
+            DB_ERROR_CANNOT_DROP        => 'kan inte sl�ppa',
+            DB_ERROR_CONSTRAINT         => 'begr�nsning kr�nkt',
+            DB_ERROR_DIVZERO            => 'division med noll',
+            DB_ERROR_INVALID            => 'ogiltig',
+            DB_ERROR_INVALID_DATE       => 'ogiltigt datum eller tid',
+            DB_ERROR_INVALID_NUMBER     => 'ogiltigt tal',
+            DB_ERROR_MISMATCH           => 'felaktig matchning',
+            DB_ERROR_NODBSELECTED       => 'ingen databas vald',
+            DB_ERROR_NOSUCHFIELD        => 'inget s�dant f�lt',
+            DB_ERROR_NOSUCHTABLE        => 'ingen s�dan tabell',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend klarar det inte',
+            DB_ERROR_NOT_FOUND          => 'finns inte',
+            DB_ERROR_NOT_LOCKED         => 'inte l�st',
+            DB_ERROR_SYNTAX             => 'syntaxfel',
+            DB_ERROR_UNSUPPORTED        => 'st�ds ej',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'v�rde r�knat p� rad',
+            DB_ERROR_INVALID_DSN        => 'ogiltig DSN',
+            DB_ERROR_CONNECT_FAILED     => 'anslutning misslyckades',
+            0                         => 'inget fel', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'otillr�ckligt med data angivet',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'ut�kning hittades ej',
+            DB_ERROR_NOSUCHDB           => 'ingen s�dan databas',
+            DB_ERROR_ACCESS_VIOLATION   => 'otillr�ckliga r�ttigheter'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb-uk1251.inc.php b/lib/adodb/lang/adodb-uk1251.inc.php
new file mode 100644 (file)
index 0000000..675016d
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+
+// Ukrainian language file contributed by  Alex Rootoff rootoff{AT}pisem.net.
+
+$ADODB_LANG_ARRAY = array (
+             'LANG'                      => 'uk1251',
+            DB_ERROR                    => 'íåâ³äîìà ïîìèëêà',
+            DB_ERROR_ALREADY_EXISTS     => 'âæå ³ñíóº',
+            DB_ERROR_CANNOT_CREATE      => 'íåìîæëèâî ñòâîðèòè',
+            DB_ERROR_CANNOT_DELETE      => 'íåìîæëèâî âèäàëèòè',
+            DB_ERROR_CANNOT_DROP        => 'íåìîæëèâî çíèùèòè (drop)',
+            DB_ERROR_CONSTRAINT         => 'ïîðóøåííÿ óìîâ ïåðåâ³ðêè',
+            DB_ERROR_DIVZERO            => 'ä³ëåííÿ íà 0',
+            DB_ERROR_INVALID            => 'íåïðàâèëüíî',
+            DB_ERROR_INVALID_DATE       => 'íåïðàâèëüíà äàòà ÷è ÷àñ',
+            DB_ERROR_INVALID_NUMBER     => 'íåïðàâèëüíå ÷èñëî',
+            DB_ERROR_MISMATCH           => 'ïîìèëêà',
+            DB_ERROR_NODBSELECTED       => 'íå âèáðàíî ÁÄ',
+            DB_ERROR_NOSUCHFIELD        => 'íå ³ñíóº ïîëå',
+            DB_ERROR_NOSUCHTABLE        => 'íå ³ñíóº òàáëèöÿ',
+            DB_ERROR_NOT_CAPABLE        => 'ÑÓÁÄ íå â ñòàí³',
+            DB_ERROR_NOT_FOUND          => 'íå çíàéäåíî',
+            DB_ERROR_NOT_LOCKED         => 'íå çàáëîêîâàíî',
+            DB_ERROR_SYNTAX             => 'ñèíòàêñè÷íà ïîìèëêà',
+            DB_ERROR_UNSUPPORTED        => 'íå ï³äòðèìóºòüñÿ',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'ðàõ³âíèê çíà÷åíü â ñòð³÷ö³',
+            DB_ERROR_INVALID_DSN        => 'íåïðàâèëüíà DSN',
+            DB_ERROR_CONNECT_FAILED     => 'ç\'ºäíàííÿ íåóñï³øíå',
+            0                               => 'âñå ãàðàçä', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'íàäàíî íåäîñòàòíüî äàíèõ',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'ðîçøèðåííÿ íå çíàéäåíî',
+            DB_ERROR_NOSUCHDB           => 'íå ³ñíóº ÁÄ',
+            DB_ERROR_ACCESS_VIOLATION   => 'íåäîñòàòíüî ïðàâ äîñòóïà'
+);
+?>
\ No newline at end of file
diff --git a/lib/adodb/lang/adodb_th.inc.php b/lib/adodb/lang/adodb_th.inc.php
new file mode 100644 (file)
index 0000000..3fdd997
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+// by Trirat Petchsingh <rosskouk#gmail.com>
+$ADODB_LANG_ARRAY = array (
+                       'LANG'                      => 'th',
+            DB_ERROR                    => 'error ไม่รู้สาเหตุ',
+            DB_ERROR_ALREADY_EXISTS     => 'มีà¹?ลà¹\89ว',
+            DB_ERROR_CANNOT_CREATE      => 'สร้างไม่ได้',
+            DB_ERROR_CANNOT_DELETE      => 'ลบไม่ได้',
+            DB_ERROR_CANNOT_DROP        => 'drop ไม่ได้',
+            DB_ERROR_CONSTRAINT         => 'constraint violation',
+            DB_ERROR_DIVZERO            => 'หาà¸?à¸\94à¹\89วยสูà¸?',
+            DB_ERROR_INVALID            => 'ไม่ valid',
+            DB_ERROR_INVALID_DATE       => 'วันที่ เวลา ไม่ valid',
+            DB_ERROR_INVALID_NUMBER     => 'เลขไม่ valid',
+            DB_ERROR_MISMATCH           => 'mismatch',
+            DB_ERROR_NODBSELECTED       => 'à¹\84มà¹\88à¹\84à¸\94à¹\89à¹\80ลือà¸?à¸?าà¸\99à¸\82à¹\89อมูล',
+            DB_ERROR_NOSUCHFIELD        => 'ไม่มีฟีลด์นี้',
+            DB_ERROR_NOSUCHTABLE        => 'ไม่มีตารางนี้',
+            DB_ERROR_NOT_CAPABLE        => 'DB backend not capable',
+            DB_ERROR_NOT_FOUND          => 'ไม่พบ',
+            DB_ERROR_NOT_LOCKED         => 'à¹\84มà¹\88à¹\84à¸\94à¹\89ลà¹\8aอà¸?',
+            DB_ERROR_SYNTAX             => 'ผิด syntax',
+            DB_ERROR_UNSUPPORTED        => 'ไม่ support',
+            DB_ERROR_VALUE_COUNT_ON_ROW => 'value count on row',
+            DB_ERROR_INVALID_DSN        => 'invalid DSN',
+            DB_ERROR_CONNECT_FAILED     => 'ไม่สามารถ connect',
+            0                          => 'no error', // DB_OK
+            DB_ERROR_NEED_MORE_DATA     => 'ข้อมูลไม่เพียงพอ',
+            DB_ERROR_EXTENSION_NOT_FOUND=> 'ไม่พบ extension',
+            DB_ERROR_NOSUCHDB           => 'ไม่มีข้อมูลนี้',
+            DB_ERROR_ACCESS_VIOLATION   => 'permissions ไม่พอ'
+);
+?>
\ No newline at end of file
index 7531e59..86b7198 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
index 9dc3e9b..d897ea4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
index 0ddd3a8..a3d2a1d 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
@@ -99,7 +99,7 @@ class perf_mssql extends adodb_perf{
                $rs = $this->conn->Execute($sql);
                //adodb_printr($rs);
                $ADODB_FETCH_MODE = $save;
-               if ($rs) {
+               if ($rs && !$rs->EOF) {
                        $rs->MoveNext();
                        $s .= '<table bgcolor=white border=0 cellpadding="1" callspacing=0><tr><td nowrap align=center> Rows<td nowrap align=center> IO<td nowrap align=center> CPU<td align=left> &nbsp; &nbsp; Plan</tr>';
                        while (!$rs->EOF) {
index 3419389..c90a7d1 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt. 
index ac35173..576a187 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.11 5 May 2010   (c) 2000-2010 John Lim (jlim#natsoft.com). All rights reserved.
+V5.14 8 Sept 2011  (c) 2000-2011 John Lim (jlim#natsoft.com). All rights reserved.
   Released under both BSD license and Lesser GPL library license. 
   Whenever there is any discrepancy between the two licenses, 
   the BSD license will take precedence. See License.txt.