Fixed bug #12755: Update to ADOdb 5.10
authorOliver Hader <oliver.hader@typo3.org>
Wed, 25 Nov 2009 15:02:13 +0000 (15:02 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 25 Nov 2009 15:02:13 +0000 (15:02 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6540 709f56b5-9817-0410-a4d7-c38de5d9e867

75 files changed:
ChangeLog
typo3/sysext/adodb/adodb/adodb-active-record.inc.php
typo3/sysext/adodb/adodb/adodb-csvlib.inc.php
typo3/sysext/adodb/adodb/adodb-datadict.inc.php
typo3/sysext/adodb/adodb/adodb-errorhandler.inc.php
typo3/sysext/adodb/adodb/adodb-exceptions.inc.php
typo3/sysext/adodb/adodb/adodb-iterator.inc.php
typo3/sysext/adodb/adodb/adodb-memcache.lib.inc.php
typo3/sysext/adodb/adodb/adodb-pager.inc.php
typo3/sysext/adodb/adodb/adodb-time.inc.php
typo3/sysext/adodb/adodb/adodb.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-access.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-db2.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-firebird.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-generic.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-ibase.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-informix.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-mssql.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-mssqlnative.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-mysql.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-oci8.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-postgres.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-sapdb.inc.php
typo3/sysext/adodb/adodb/datadict/datadict-sybase.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-access.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-ado.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-ado5.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-ado_access.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-ado_mssql.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-borland_ibase.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-csv.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-db2.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-fbsql.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-firebird.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-ibase.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-informix72.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-ldap.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-mssql.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-mssqlnative.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-mysql.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-mysqli.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-mysqlpo.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-mysqlt.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-netezza.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-oci8.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-oci8.old.inc.php [deleted file]
typo3/sysext/adodb/adodb/drivers/adodb-oci8po.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-odbc.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-odbc_db2.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-odbc_mssql.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-odbc_oracle.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-odbtp.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-odbtp_unicode.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-oracle.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-pdo.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-pdo_mssql.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-pdo_mysql.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-pdo_oci.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-pdo_pgsql.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-pdo_sqlite.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-postgres.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-postgres64.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-postgres7.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-postgres8.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-proxy.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-sapdb.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-sqlite.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-sqlitepo.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-sybase.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-sybase_ase.inc.php
typo3/sysext/adodb/adodb/drivers/adodb-vfp.inc.php
typo3/sysext/adodb/doc/508a.DBAL.patch [deleted file]
typo3/sysext/adodb/doc/510.DBAL.patch [new file with mode: 0644]
typo3/sysext/adodb/doc/mssql-error-fix.patch
typo3/sysext/adodb/ext_emconf.php

index 2f4cb2f..1005837 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,7 @@
        * Fixed bug #9981: EM does not test for usage of mod.php-API and spuriously displays an error (thanks to Andreas Kundoch)
        * Follow-up to bugfix #12581: Use FILTER_FLAG_SCHEME_REQUIRED constant in t3lib_div::isValidUrl()
        * Follow-up to bugfix #12420: Removed deprecation logging from methods that are still used in the TYPO3 Core
+       * Fixed bug #12755: Update to ADOdb 5.10
 
 2009-11-24  Stanislas Rolland  <typo3@sjbr.ca>
 
index 796713b..55a89bb 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
 
-@version V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+@version V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -26,6 +26,7 @@ global $ADODB_ACTIVE_DEFVALS; // use default values of table definition when cre
 $_ADODB_ACTIVE_DBS = array();
 $ACTIVE_RECORD_SAFETY = true;
 $ADODB_ACTIVE_DEFVALS = false;
+$ADODB_ACTIVE_CACHESECS = 0;
 
 class ADODB_Active_DB {
        var $db; // ADOConnection
@@ -73,6 +74,8 @@ function ADODB_SetDatabaseAdapter(&$db, $index=false)
 
 class ADODB_Active_Record {
        static $_changeNames = true; // dynamically pluralize table names
+       static $_quoteNames = false;
+       
        static $_foreignSuffix = '_id'; // 
        var $_dbat; // associative index pointing to ADODB_Active_DB eg. $ADODB_Active_DBS[_dbat]
        var $_table; // tablename, if set in class definition then use it as table name
@@ -655,6 +658,13 @@ class ADODB_Active_Record {
        }
        
        
+       function _QName($n,$db=false)
+       {
+               if (!ADODB_Active_Record::$_quoteNames) return $n;
+               if (!$db) $db = $this->DB(); if (!$db) return false;
+               return $db->nameQuote.$n.$db->nameQuote;
+       }
+       
        //------------------------------------------------------------ Public functions below
        
        function Load($where=null,$bindarr=false)
@@ -708,6 +718,7 @@ class ADODB_Active_Record {
                return $ok;
        }
        
+       
        // false on error
        function Insert()
        {
@@ -723,7 +734,7 @@ class ADODB_Active_Record {
                        $val = $this->$name;
                        if(!is_array($val) || !is_null($val) || !array_key_exists($name, $table->keys)) {
                                $valarr[] = $val;
-                               $names[] = $name;
+                               $names[] = $this->_QName($name,$db);
                                $valstr[] = $db->Param($cnt);
                                $cnt += 1;
                        }
@@ -883,7 +894,7 @@ class ADODB_Active_Record {
                                continue;
                        }                       
                        $valarr[] = $val;
-                       $pairs[] = $name.'='.$db->Param($cnt);
+                       $pairs[] = $this->_QName($name,$db).'='.$db->Param($cnt);
                        $cnt += 1;
                }
                
@@ -922,9 +933,9 @@ global $_ADODB_ACTIVE_DBS;
        {
                $rows = false;
                if(isset($extra['offset'])) {
-                       $rs = $db->SelectLimit($qry, $extra['limit'], $extra['offset']);
+                       $rs = $db->SelectLimit($qry, $extra['limit'], $extra['offset'],$bindarr);
                } else {
-                       $rs = $db->SelectLimit($qry, $extra['limit']);
+                       $rs = $db->SelectLimit($qry, $extra['limit'],-1,$bindarr);
                }
                if ($rs) {
                        while (!$rs->EOF) {
index 9c5385a..7b1c9e1 100644 (file)
@@ -8,7 +8,7 @@ $ADODB_INCLUDED_CSV = 1;
 
 /* 
 
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -71,6 +71,7 @@ $ADODB_INCLUDED_CSV = 1;
                $savefetch = isset($rs->adodbFetchMode) ? $rs->adodbFetchMode : $rs->fetchMode;
                $class = $rs->connection->arrayClass;
                $rs2 = new $class();
+               $rs2->timeCreated = $rs->timeCreated; # memcache fix
                $rs2->sql = $rs->sql;
                $rs2->oldProvider = $rs->dataProvider; 
                $rs2->InitArrayFields($rows,$flds);
index c9ef4e7..19500ca 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -519,7 +519,7 @@ class ADODB_DataDict {
                        // genfields can return FALSE at times
                        if ($lines == null) $lines = array();
                        list(,$first) = each($lines);
-                       list(,$column_def) = split("[\t ]+",$first,2);
+                       list(,$column_def) = preg_split("/[\t ]+/",$first,2);
                }
                return array(sprintf($this->renameColumn,$tabname,$this->NameQuote($oldcolumn),$this->NameQuote($newcolumn),$column_def));
        }
index cc735f8..3cf68a4 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @version V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.10 10 Nov 2009   (c) 2000-2009 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 a0b1b77..b444706 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
- * @version V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ * @version V5.10 10 Nov 2009   (c) 2000-2009 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 50d9d2a..0ecea26 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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 f50dbdb..dad4c38 100644 (file)
@@ -65,7 +65,7 @@ $db->CacheExecute($sql);
 
                        $memcache = new MemCache;
                        
-                       if (!is_array($this->hosts)) $this->hosts = array($hosts);
+                       if (!is_array($this->hosts)) $this->hosts = array($this->hosts);
                
                        $failcnt = 0;
                        foreach($this->hosts as $host) {
index f542c3c..d6980c1 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-       V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+       V5.10 10 Nov 2009   (c) 2000-2009 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 0637421..0763895 100644 (file)
@@ -1214,7 +1214,7 @@ function adodb_mktime($hr,$min,$sec,$mon=false,$day=false,$year=false,$is_dst=fa
                
                // for windows, we don't check 1970 because with timezone differences, 
                // 1 Jan 1970 could generate negative timestamp, which is illegal
-               $usephpfns = (1971 < $year && $year < 2038
+               $usephpfns = (1970 < $year && $year < 2038
                        || !defined('ADODB_NO_NEGATIVE_TS') && (1901 < $year && $year < 2038)
                        ); 
                        
index 9a619ff..9752d10 100644 (file)
@@ -14,7 +14,7 @@
 /**
        \mainpage
        
-        @version V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+        @version V5.10 10 Nov 2009   (c) 2000-2009 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.08 6 Apr 2009  (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.';
+               $ADODB_vers = 'V5.10 10 Nov 2009  (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved. Released BSD & LGPL.';
        
                /**
                 * Determines whether recordset->RecordCount() is used. 
 
        var $sysDate = false; /// name of function that returns the current date
        var $sysTimeStamp = false; /// name of function that returns the current timestamp
+       var $sysUTimeStamp = false; // name of function that returns the current timestamp accurate to the microsecond or nearest fraction
        var $arrayClass = 'ADORecordSet_array'; /// name of class used to generate array recordsets, which are pre-downloaded recordsets
        
        var $noNullStrings = false; /// oracle specific stuff - if true ensures that '' is converted to ' '
                
                $this->_isPersistentConnection = false; 
                        
-               global $ADODB_CACHE;
-               if (empty($ADODB_CACHE)) $this->_CreateCache();
-               
                if ($forceNew) {
                        if ($rez=$this->_nconnect($this->host, $this->user, $this->password, $this->database)) return true;
                } else {
                        
                $this->_isPersistentConnection = true;  
                
-               global $ADODB_CACHE;
-               if (empty($ADODB_CACHE)) $this->_CreateCache();
-               
                if ($rez = $this->_pconnect($this->host, $this->user, $this->password, $this->database)) return true;
                if (isset($rez)) {
                        $err = $this->ErrorMsg();
        *  @param $table        name of table to lock
        *  @param $where        where clause to use, eg: "WHERE row=12". If left empty, will escalate to table lock
        */
-       function RowLock($table,$where)
+       function RowLock($table,$where,$col='1 as ignore')
        {
                return false;
        }
        {
        global $ADODB_CACHE_DIR, $ADODB_CACHE;
                
+               if (empty($ADODB_CACHE)) return false;
+               
                if (!$sql) {
                         $ADODB_CACHE->flushall($this->debug);
                 return;
        {
        global $ADODB_CACHE;
        
+               if (empty($ADODB_CACHE)) $this->_CreateCache();
+               
                if (!is_numeric($secs2cache)) {
                        $inputarr = $sql;
                        $sql = $secs2cache;
                $rs = $this->SelectLimit($sql,1);
                if (!$rs) return $false; // table does not exist
                $rs->tableName = $table;
+               $rs->sql = $sql;
                
                switch((string) $mode) {
                case 'UPDATE':
@@ -2439,6 +2439,9 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
                if (empty($d) && $d !== 0) return 'null';
                if ($isfld) return $d;
                
+               if (is_object($d)) return $d->format($this->fmtDate);
+               
+               
                if (is_string($d) && !is_numeric($d)) {
                        if ($d === 'null' || strncmp($d,"'",1) === 0) return $d;
                        if ($this->isoDates) return "'$d'";
@@ -2476,6 +2479,7 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
        {
                if (empty($ts) && $ts !== 0) return 'null';
                if ($isfld) return $ts;
+               if (is_object($ts)) return $ts->format($this->fmtTimeStamp);
                
                # strlen(14) allows YYYYMMDDHHMMSS format
                if (!is_string($ts) || (is_numeric($ts) && strlen($ts)<14)) 
@@ -2604,7 +2608,7 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
                // undo magic quotes for "
                $s = str_replace('\\"','"',$s);
                
-               if ($this->replaceQuote == "\\'")  // ' already quoted, no need to change anything
+               if ($this->replaceQuote == "\\'" || ini_get('magic_quotes_sybase'))  // ' already quoted, no need to change anything
                        return $s;
                else {// change \' to '' for sybase/mssql
                        $s = str_replace('\\\\','\\',$s);
@@ -2638,7 +2642,7 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
                // undo magic quotes for "
                $s = str_replace('\\"','"',$s);
                
-               if ($this->replaceQuote == "\\'")  // ' already quoted, no need to change anything
+               if ($this->replaceQuote == "\\'" || ini_get('magic_quotes_sybase'))  // ' already quoted, no need to change anything
                        return "'$s'";
                else {// change \' to '' for sybase/mssql
                        $s = str_replace('\\\\','\\',$s);
@@ -4254,6 +4258,18 @@ http://www.stanford.edu/dept/itss/docs/oracle/10g/server.101/b10759/statements_1
                                        case 'socket': $obj->socket = $v; break;
                                        #oci8
                                        case 'nls_date_format': $obj->NLS_DATE_FORMAT = $v; break;
+                                       case 'cachesecs': $obj->cacheSecs = $v; break;
+                                       case 'memcache': 
+                                               $varr = explode(':',$v);
+                                               $vlen = sizeof($varr);
+                                               if ($vlen == 0) break;  
+                                               $obj->memCache = true;
+                                               $obj->memCacheHost = explode(',',$varr[0]);
+                                               if ($vlen == 1) break;  
+                                               $obj->memCachePort = $varr[1];
+                                               if ($vlen == 2) break;  
+                                               $obj->memCacheCompress = $varr[2] ?  true : false;
+                                               break;
                                        }
                                }
                                if (empty($persist))
index e4d1c23..8cd25d5 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -30,7 +30,8 @@ class ADODB2_access extends ADODB_DataDict {
                case 'X2': return 'MEMO';
                
                case 'B': return 'BINARY';
-                       
+               
+               case 'TS':
                case 'D': return 'DATETIME';
                case 'T': return 'DATETIME';
                
index 4934c93..9177a1b 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -30,6 +30,7 @@ class ADODB2_db2 extends ADODB_DataDict {
                case 'B': return 'BLOB';
 
                case 'D': return 'DATE';
+               case 'TS':
                case 'T': return 'TIMESTAMP';
 
                case 'L': return 'SMALLINT';
index 9afc6c7..2a2a064 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -30,6 +30,7 @@ class ADODB2_firebird extends ADODB_DataDict {
                case 'B': return 'BLOB';
                        
                case 'D': return 'DATE';
+               case 'TS':
                case 'T': return 'TIMESTAMP';
                
                case 'L': return 'SMALLINT';
index ccad1ba..53a0fdf 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -32,6 +32,7 @@ class ADODB2_generic extends ADODB_DataDict {
                case 'B': return 'VARCHAR';
                        
                case 'D': return 'DATE';
+               case 'TS':
                case 'T': return 'DATE';
                
                case 'L': return 'DECIMAL(1)';
index 3cdd52f..e3efec1 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -32,6 +32,7 @@ class ADODB2_ibase extends ADODB_DataDict {
                case 'B': return 'BLOB';
                        
                case 'D': return 'DATE';
+               case 'TS':
                case 'T': return 'TIMESTAMP';
                
                case 'L': return 'SMALLINT';
index ae0731a..63a0c01 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -32,6 +32,7 @@ class ADODB2_informix extends ADODB_DataDict {
                case 'B': return 'BLOB';
                        
                case 'D': return 'DATE';
+               case 'TS':
                case 'T': return 'DATETIME YEAR TO SECOND';
                
                case 'L': return 'SMALLINT';
index 65c897e..57652ab 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -89,6 +89,8 @@ class ADODB2_mssql extends ADODB_DataDict {
                case 'B': return 'IMAGE';
                        
                case 'D': return 'DATETIME';
+               
+               case 'TS':
                case 'T': return 'DATETIME';
                case 'L': return 'BIT';
                
index 2dac9e5..5162c6f 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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 2f7426b..9551e4a 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -89,6 +89,7 @@ class ADODB2_mysql extends ADODB_DataDict {
                case 'B': return 'LONGBLOB';
                        
                case 'D': return 'DATE';
+               case 'TS':
                case 'T': return 'DATETIME';
                case 'L': return 'TINYINT';
                
index dfffd94..f9ea6eb 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -55,6 +55,9 @@ class ADODB2_oci8 extends ADODB_DataDict {
                case 'BLOB':
                        return 'B';
                
+               case 'TIMESTAMP':
+                       return 'TS';
+                       
                case 'DATE': 
                        return 'T';
                
@@ -79,7 +82,10 @@ class ADODB2_oci8 extends ADODB_DataDict {
                case 'X2': return 'NVARCHAR2(4000)';
                
                case 'B': return 'BLOB';
-                       
+               
+               case 'TS':
+                               return 'TIMESTAMP';
+                               
                case 'D': 
                case 'T': return 'DATE';
                case 'L': return 'NUMBER(1)';
index b3a8e75..cb92c20 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -100,6 +100,7 @@ class ADODB2_postgres extends ADODB_DataDict {
                case 'B': return 'BYTEA';
                        
                case 'D': return 'DATE';
+               case 'TS':
                case 'T': return 'TIMESTAMP';
                
                case 'L': return 'BOOLEAN';
index 76331e5..d4143d1 100644 (file)
@@ -33,6 +33,7 @@ class ADODB2_sapdb extends ADODB_DataDict {
                case 'B': return 'LONG';
                        
                case 'D': return 'DATE';
+               case 'TS':
                case 'T': return 'TIMESTAMP';
                
                case 'L': return 'BOOLEAN';
index 26545a9..a3fd0bc 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /**
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -55,6 +55,7 @@ class ADODB2_sybase extends ADODB_DataDict {
                case 'B': return 'IMAGE';
                        
                case 'D': return 'DATETIME';
+               case 'TS':
                case 'T': return 'DATETIME';
                case 'L': return 'BIT';
                
index 61e06db..36645ee 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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 557c476..552e577 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -169,7 +169,7 @@ class ADODB_ado extends ADOConnection {
                return $arr;
        }
        
-       function MetaColumns($table)
+       function MetaColumns($table, $normalize=true)
        {
                $table = strtoupper($table);
                $arr = array();
index 54a6f19..51beb65 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -194,7 +194,7 @@ class ADODB_ado extends ADOConnection {
                return $arr;
        }
        
-       function MetaColumns($table)
+       function MetaColumns($table, $normalize=true)
        {
                $table = strtoupper($table);
                $arr= array();
@@ -640,6 +640,10 @@ class ADORecordSet_ado extends ADORecordSet {
                        case 1: // null
                                $this->fields[] = false;
                                break;
+                       case 20:
+                       case 21: // bigint (64 bit)
+                       $this->fields[] = (float) $f->value; // if 64 bit PHP, could use (int)
+                       break;
                        case 6: // currency is not supported properly;
                                ADOConnection::outp( '<b>'.$f->Name.': currency type not supported by PHP</b>');
                                $this->fields[] = (float) $f->value;
index 7640af3..3a827a5 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -26,7 +26,6 @@ class  ADODB_ado_access extends ADODB_ado {
        var $fmtTimeStamp = "#Y-m-d h:i:sA#";// note no comma
        var $sysDate = "FORMAT(NOW,'yyyy-mm-dd')";
        var $sysTimeStamp = 'NOW';
-       var $hasTransactions = false;
        var $upperCase = 'ucase';
        
        function ADODB_ado_access()
@@ -34,11 +33,11 @@ class  ADODB_ado_access extends ADODB_ado {
                $this->ADODB_ado();
        }
        
-       function BeginTrans() { return false;}
+       /*function BeginTrans() { return false;}
        
        function CommitTrans() { return false;}
        
-       function RollbackTrans() { return false;}
+       function RollbackTrans() { return false;}*/
 
 }
 
index e9bb7c2..0831984 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -71,7 +71,7 @@ class  ADODB_ado_mssql extends ADODB_ado {
                return str_replace("\0", "\\\\000", $s);
        }
        
-       function MetaColumns($table)
+       function MetaColumns($table, $normalize=true)
        {
         $table = strtoupper($table);
         $arr= array();
index ce55f28..301fd19 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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 4fe3100..fd52b60 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -72,7 +72,7 @@ class ADODB_csv extends ADOConnection {
                return true;
        }
        
-       function MetaColumns($table) 
+       function MetaColumns($table, $normalize=true
        {
                return false;
        }
index 5ee8da4..5bd9ebe 100644 (file)
@@ -24,6 +24,9 @@ if (!defined('ADODB_DIR')) die();
 --------------------------------------------------------------------------------------*/
 
 
+
+
+
 class ADODB_db2 extends ADOConnection {
        var $databaseType = "db2";      
        var $fmtDate = "'Y-m-d'";
@@ -52,6 +55,7 @@ class ADODB_db2 extends ADOConnection {
        var $uCaseTables = true; // for meta* functions, uppercase table names
        var $hasInsertID = true;
        
+       
     function _insertid()
     {
         return ADOConnection::GetOne('VALUES IDENTITY_VAL_LOCAL()');
@@ -75,10 +79,14 @@ class ADODB_db2 extends ADOConnection {
                // Replaces the odbc_binmode() call that was in Execute()
                ini_set('ibm_db2.binmode', $this->binmode);
 
-               if ($argDatabasename) {
-                       $this->_connectionID = db2_connect($argDatabasename,$argUsername,$argPassword);
+               if ($argDatabasename && empty($argDSN)) {
+               
+                       if (stripos($argDatabasename,'UID=') && stripos($argDatabasename,'PWD=')) $this->_connectionID = db2_connect($argDatabasename,null,null);
+                       else $this->_connectionID = db2_connect($argDatabasename,$argUsername,$argPassword);
                } else {
-                       $this->_connectionID = db2_connect($argDSN,$argUsername,$argPassword);
+                       if ($argDatabasename) $schema = $argDatabasename;
+                       if (stripos($argDSN,'UID=') && stripos($argDSN,'PWD=')) $this->_connectionID = db2_connect($argDSN,null,null);
+                       else $this->_connectionID = db2_connect($argDSN,$argUsername,$argPassword);
                }
                if (isset($php_errormsg)) $php_errormsg = '';
 
@@ -86,9 +94,9 @@ class ADODB_db2 extends ADOConnection {
                // an array of valid options.  So far, we don't use them.
 
                $this->_errorMsg = @db2_conn_errormsg();
                if (isset($this->connectStmt)) $this->Execute($this->connectStmt);
                
+               if ($this->_connectionID && isset($schema)) $this->Execute("SET SCHEMA=$schema");
                return $this->_connectionID != false;
        }
        
@@ -106,10 +114,14 @@ class ADODB_db2 extends ADOConnection {
                if (isset($php_errormsg)) $php_errormsg = '';
                $this->_errorMsg = isset($php_errormsg) ? $php_errormsg : '';
                
-               if ($argDatabasename) {
-                       $this->_connectionID = db2_pconnect($argDatabasename,$argUsername,$argPassword);
+               if ($argDatabasename && empty($argDSN)) {
+               
+                       if (stripos($argDatabasename,'UID=') && stripos($argDatabasename,'PWD=')) $this->_connectionID = db2_pconnect($argDatabasename,null,null);
+                       else $this->_connectionID = db2_pconnect($argDatabasename,$argUsername,$argPassword);
                } else {
-                       $this->_connectionID = db2_pconnect($argDSN,$argUsername,$argPassword);
+                       if ($argDatabasename) $schema = $argDatabasename;
+                       if (stripos($argDSN,'UID=') && stripos($argDSN,'PWD=')) $this->_connectionID = db2_pconnect($argDSN,null,null);
+                       else $this->_connectionID = db2_pconnect($argDSN,$argUsername,$argPassword);
                }
                if (isset($php_errormsg)) $php_errormsg = '';
 
@@ -117,6 +129,7 @@ class ADODB_db2 extends ADOConnection {
                if ($this->_connectionID && $this->autoRollback) @db2_rollback($this->_connectionID);
                if (isset($this->connectStmt)) $this->Execute($this->connectStmt);
                
+               if ($this->_connectionID && isset($schema)) $this->Execute("SET SCHEMA=$schema");
                return $this->_connectionID != false;
        }
 
@@ -223,7 +236,6 @@ class ADODB_db2 extends ADOConnection {
                        return ADOConnection::ServerInfo();
                }
        }
-
        
        function CreateSequence($seqname='adodbseq',$start=1)
        {
@@ -239,6 +251,25 @@ class ADODB_db2 extends ADOConnection {
                return $this->Execute(sprintf($this->_dropSeqSQL,$seqname));
        }
        
+       function SelectLimit($sql,$nrows=-1,$offset=-1,$inputArr=false)
+       {
+               $nrows = (integer) $nrows;
+               if ($offset <= 0) {
+               // could also use " OPTIMIZE FOR $nrows ROWS "
+                       if ($nrows >= 0) $sql .=  " FETCH FIRST $nrows ROWS ONLY ";
+                       $rs = $this->Execute($sql,$inputArr);
+               } else {
+                       if ($offset > 0 && $nrows < 0);
+                       else {
+                               $nrows += $offset;
+                               $sql .=  " FETCH FIRST $nrows ROWS ONLY ";
+                       }
+                       $rs = ADOConnection::SelectLimit($sql,-1,$offset,$inputArr);
+               }
+               
+               return $rs;
+       }
+       
        /*
                This algorithm is not very efficient, but works even if table locking
                is not available.
@@ -407,7 +438,6 @@ class ADODB_db2 extends ADOConnection {
                }
                
                $arr = $rs->GetArray();
-               
                $rs->Close();
                $arr2 = array();
                
@@ -417,12 +447,13 @@ class ADODB_db2 extends ADOConnection {
                for ($i=0; $i < sizeof($arr); $i++) {
                        if (!$arr[$i][2]) continue;
                        $type = $arr[$i][3];
+                       $owner = $arr[$i][1];
                        $schemaval = ($schema) ? $arr[$i][1].'.' : '';
                        if ($ttype) { 
                                if ($isview) {
                                        if (strncmp($type,'V',1) === 0) $arr2[] = $schemaval.$arr[$i][2];
-                               } else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $schemaval.$arr[$i][2];
-                       } else if (strncmp($type,'SYS',3) !== 0) $arr2[] = $schemaval.$arr[$i][2];
+                               } else if (strncmp($owner,'SYS',3) !== 0) $arr2[] = $schemaval.$arr[$i][2];
+                       } else if (strncmp($owner,'SYS',3) !== 0) $arr2[] = $schemaval.$arr[$i][2];
                }
                return $arr2;
        }
@@ -495,7 +526,7 @@ See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/db2/htm/db2
                }
        }
        
-       function MetaColumns($table)
+       function MetaColumns($table, $normalize=true)
        {
        global $ADODB_FETCH_MODE;
        
@@ -591,6 +622,7 @@ See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/db2/htm/db2
                return $retarr;
        }
        
+               
        function Prepare($sql)
        {
                if (! $this->_bindInputArray) return $sql; // no binding
index b40281b..13bbd86 100644 (file)
@@ -80,7 +80,7 @@ class ADODB_fbsql extends ADOConnection {
                return true;    
        }
        
-       function MetaColumns($table) 
+       function MetaColumns($table, $normalize=true
        {
                if ($this->metaColumnsSQL) {
                        
index 09f7e4a..d234a62 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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 dfa94f5..0dc5c7a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.  
+V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -242,7 +242,7 @@ class ADODB_ibase extends ADOConnection {
 
        
        // See http://community.borland.com/article/0,1410,25844,00.html
-       function RowLock($tables,$where,$col)
+       function RowLock($tables,$where,$col=false)
        {
                if ($this->autoCommit) $this->BeginTrans();
                $this->Execute("UPDATE $table SET $col=$col WHERE $where "); // is this correct - jlim?
@@ -476,7 +476,7 @@ class ADODB_ibase extends ADOConnection {
        }
        //OPN STUFF end
                // returns array of ADOFieldObjects for current table
-       function MetaColumns($table) 
+       function MetaColumns($table, $normalize=true
        {
        global $ADODB_FETCH_MODE;
                
index 25dee2b..dd49123 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim. All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -123,10 +123,10 @@ class ADODB_informix72 extends ADOConnection {
                return true;
        }
 
-       function RowLock($tables,$where,$flds='1 as ignore')
+       function RowLock($tables,$where,$col='1 as ignore')
        {
                if ($this->_autocommit) $this->BeginTrans();
-               return $this->GetOne("select $flds from $tables where $where for update");
+               return $this->GetOne("select $col from $tables where $where for update");
        }
 
        /*      Returns: the last error message from previous database operation
@@ -147,7 +147,7 @@ class ADODB_informix72 extends ADOConnection {
        }
 
    
-    function MetaColumns($table)
+    function MetaColumns($table, $normalize=true)
        {
        global $ADODB_FETCH_MODE;
        
@@ -369,7 +369,7 @@ class ADORecordset_informix72 extends ADORecordSet {
                        foreach($fp as $k => $v) {
                                $o = new ADOFieldObject;
                                $o->name = $k;
-                               $arr = split(';',$v); //"SQLTYPE;length;precision;scale;ISNULLABLE"
+                               $arr = explode(';',$v); //"SQLTYPE;length;precision;scale;ISNULLABLE"
                                $o->type = $arr[0];
                                $o->max_length = $arr[1];
                                $this->_fieldprops[] = $o;
index db42b78..d6ebb40 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -61,7 +61,7 @@ class ADODB_ldap extends ADOConnection {
                        $conn_info = array( $host,$this->port);
                
                        if ( strstr( $host, ':' ) ) {
-                           $conn_info = split( ':', $host );
+                           $conn_info = explode( ':', $host );
                        } 
                
                        $this->_connectionID = @ldap_connect( $conn_info[0], $conn_info[1] );
index 65a1c20..21de19a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -160,6 +160,41 @@ class ADODB_mssql extends ADOConnection {
                }
        }
 
+
+
+       /**
+       * Correctly quotes a string so that all strings are escaped. We prefix and append
+       * to the string single-quotes.
+       * An example is  $db->qstr("Don't bother",magic_quotes_runtime());
+       * 
+       * @param s         the string to quote
+       * @param [magic_quotes]    if $s is GET/POST var, set to get_magic_quotes_gpc().
+       *              This undoes the stupidity of magic quotes for GPC.
+       *
+       * @return  quoted string to be sent back to database
+       */
+       function qstr($s,$magic_quotes=false)
+       {
+               if (!$magic_quotes) {
+                       return  "'".str_replace("'",$this->replaceQuote,$s)."'";
+               }
+
+               // undo magic quotes for " unless sybase is on
+               $sybase = ini_get('magic_quotes_sybase');
+               if (!$sybase) {
+                       $s = str_replace('\\"','"',$s);
+                       if ($this->replaceQuote == "\\'")  // ' already quoted, no need to change anything
+                               return "'$s'";
+                       else {// change \' to '' for sybase/mssql
+                               $s = str_replace('\\\\','\\',$s);
+                               return "'".str_replace("\\'",$this->replaceQuote,$s)."'";
+                       }
+               } else {
+                       return "'".$s."'";
+               }
+       }
+// moodle change end - see readme_moodle.txt
+
        function _affectedrows()
        {
                return $this->GetOne('select @@rowcount');
@@ -331,14 +366,14 @@ class ADODB_mssql extends ADOConnection {
                
                See http://www.swynk.com/friends/achigrik/SQL70Locks.asp
        */
-       function RowLock($tables,$where,$flds='top 1 null as ignore') 
+       function RowLock($tables,$where,$col='top 1 null as ignore') 
        {
                if (!$this->transCnt) $this->BeginTrans();
-               return $this->GetOne("select $flds from $tables with (ROWLOCK,HOLDLOCK) where $where");
+               return $this->GetOne("select $col from $tables with (ROWLOCK,HOLDLOCK) where $where");
        }
        
        
-       function MetaIndexes($table,$primary=false)
+       function MetaIndexes($table,$primary=false, $owner=false)
        {
                $table = $this->qstr($table);
 
index 96885de..920d947 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -330,10 +330,10 @@ class ADODB_mssqlnative extends ADOConnection {
                
                See http://www.swynk.com/friends/achigrik/SQL70Locks.asp
        */
-       function RowLock($tables,$where,$flds='top 1 null as ignore') 
+       function RowLock($tables,$where,$col='top 1 null as ignore') 
        {
                if (!$this->transCnt) $this->BeginTrans();
-               return $this->GetOne("select $flds from $tables with (ROWLOCK,HOLDLOCK) where $where");
+               return $this->GetOne("select $col from $tables with (ROWLOCK,HOLDLOCK) where $where");
        }
         
        function SelectDB($dbName) 
index 07f9524..751e8bd 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -349,7 +349,7 @@ class ADODB_mysql extends ADOConnection {
                if (!$date) $date = $this->sysDate;
                
                $fraction = $dayFraction * 24 * 3600;
-               return $date . ' + INTERVAL ' .  $fraction.' SECOND';
+               return '('. $date . ' + INTERVAL ' .     $fraction.' SECOND)';
                
 //             return "from_unixtime(unix_timestamp($date)+$fraction)";
        }
@@ -394,7 +394,7 @@ class ADODB_mysql extends ADOConnection {
                return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename);
        }
        
-       function MetaColumns($table) 
+       function MetaColumns($table, $normalize=true
        {
                $this->_findschema($table,$schema);
                if ($schema) {
index 72616f6..d4c3a33 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -50,7 +50,8 @@ class ADODB_mysqli extends ADOConnection {
        var $_bindInputArray = false;
        var $nameQuote = '`';           /// string to use to quote identifiers and names
        var $optionFlags = array(array(MYSQLI_READ_DEFAULT_GROUP,0));
-  var $arrayClass = 'ADORecordSet_array_mysqli';
+       var $arrayClass = 'ADORecordSet_array_mysqli';
+       var $multiQuery = false;
        
        function ADODB_mysqli() 
        {                       
@@ -194,11 +195,11 @@ class ADODB_mysqli extends ADOConnection {
                return true;
        }
        
-       function RowLock($tables,$where='',$flds='1 as adodb_ignore') 
+       function RowLock($tables,$where='',$col='1 as adodb_ignore') 
        {
                if ($this->transCnt==0) $this->BeginTrans();
                if ($where) $where = ' where '.$where;
-               $rs = $this->Execute("select $flds from $tables $where for update");
+               $rs = $this->Execute("select $col from $tables $where for update");
                return !empty($rs); 
        }
        
@@ -526,7 +527,7 @@ class ADODB_mysqli extends ADOConnection {
            return  $foreign_keys;
        }
        
-       function MetaColumns($table) 
+       function MetaColumns($table, $normalize=true
        {
                $false = false;
                if (!$this->metaColumnsSQL)
@@ -684,15 +685,23 @@ class ADODB_mysqli extends ADOConnection {
                return $mysql_res;
                */
                
-               if( $rs = mysqli_multi_query($this->_connectionID, $sql.';') )//Contributed by "Geisel Sierote" <geisel#4up.com.br>
-               {
-                       $rs = ($ADODB_COUNTRECS) ? @mysqli_store_result( $this->_connectionID ) : @mysqli_use_result( $this->_connectionID );
-                       return $rs ? $rs : true; // mysqli_more_results( $this->_connectionID )
+               if ($this->multiQuery) {
+                       $rs = mysqli_multi_query($this->_connectionID, $sql.';');
+                       if ($rs) {
+                               $rs = ($ADODB_COUNTRECS) ? @mysqli_store_result( $this->_connectionID ) : @mysqli_use_result( $this->_connectionID );
+                               return $rs ? $rs : true; // mysqli_more_results( $this->_connectionID )
+                       }
                } else {
-                       if($this->debug)
-                       ADOConnection::outp("Query: " . $sql . " failed. " . $this->ErrorMsg());
-                       return false;
+                       $rs = mysqli_query($this->_connectionID, $sql, $ADODB_COUNTRECS ? MYSQLI_STORE_RESULT : MYSQLI_USE_RESULT);
+               
+                       if ($rs) return $rs;
                }
+
+               if($this->debug)
+                       ADOConnection::outp("Query: " . $sql . " failed. " . $this->ErrorMsg());
+               
+               return false;
+               
        }
 
        /*      Returns: the last error message from previous database operation        */      
@@ -947,6 +956,19 @@ class ADORecordSet_mysqli extends ADORecordSet{
        
        function _close() 
        {
+           //if results are attached to this pointer from Stored Proceedure calls, the next standard query will die 2014
+        //only a problem with persistant connections
+
+        //mysqli_next_result($this->connection->_connectionID); trashes the DB side attached results.
+
+        while(mysqli_more_results($this->connection->_connectionID)){
+           @mysqli_next_result($this->connection->_connectionID);
+        }
+
+        //Because you can have one attached result, without tripping mysqli_more_results
+        @mysqli_next_result($this->connection->_connectionID);
+
+
                mysqli_free_result($this->_queryID); 
                $this->_queryID = false;        
        }
index 22c9359..b52ff96 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -59,11 +59,11 @@ class ADODB_mysqlt extends ADODB_mysql {
                return true;
        }
        
-       function RowLock($tables,$where='',$flds='1 as adodb_ignore') 
+       function RowLock($tables,$where='',$col='1 as adodb_ignore') 
        {
                if ($this->transCnt==0) $this->BeginTrans();
                if ($where) $where = ' where '.$where;
-               $rs = $this->Execute("select $flds from $tables $where for update");
+               $rs = $this->Execute("select $col from $tables $where for update");
                return !empty($rs); 
        }
        
index 58ce56b..f14dc05 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -76,11 +76,11 @@ class ADODB_mysqlt extends ADODB_mysql {
                return $ok ? true : false;
        }
        
-       function RowLock($tables,$where='',$flds='1 as adodb_ignore') 
+       function RowLock($tables,$where='',$col='1 as adodb_ignore') 
        {
                if ($this->transCnt==0) $this->BeginTrans();
                if ($where) $where = ' where '.$where;
-               $rs = $this->Execute("select $flds from $tables $where for update");
+               $rs = $this->Execute("select $col from $tables $where for update");
                return !empty($rs); 
        }
        
index 372d288..8b78943 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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 13dd4ae..43b71a6 100644 (file)
@@ -30,8 +30,8 @@ For Oracle the default is dd-mon-yy or dd-mon-yyyy, and for SQL-92 the default i
 yy-mm-dd or yyyy-mm-dd.
 
 Using 'RR' in the format forces two-digit years less than or equal to 49 to be
-interpreted as years in the 21st century (2000\962049), and years over 50 as years in
-the 20th century (1950\961999). Setting the RR format as the default for all two-digit
+interpreted as years in the 21st century (2000-2049), and years over 50 as years in
+the 20th century (1950-1999). Setting the RR format as the default for all two-digit
 year entries allows you to become year-2000 compliant. For example:
 NLS_DATE_FORMAT='RR-MM-DD'
 
@@ -58,7 +58,7 @@ class ADODB_oci8 extends ADOConnection {
        var $replaceQuote = "''"; // string to use to replace quotes
        var $concat_operator='||';
        var $sysDate = "TRUNC(SYSDATE)";
-       var $sysTimeStamp = 'SYSDATE';
+       var $sysTimeStamp = 'SYSDATE'; // requires oracle 9 or later, otherwise use SYSDATE
        var $metaDatabasesSQL = "SELECT USERNAME FROM ALL_USERS WHERE USERNAME NOT IN ('SYS','SYSTEM','DBSNMP','OUTLN') ORDER BY 1";
        var $_stmt;
        var $_commit = OCI_COMMIT_ON_SUCCESS;
@@ -96,8 +96,8 @@ class ADODB_oci8 extends ADOConnection {
                if (defined('ADODB_EXTENSION')) $this->rsPrefix .= 'ext_';
        }
        
-       /*  function MetaColumns($table) added by smondino@users.sourceforge.net*/
-       function MetaColumns($table) 
+       /*  function MetaColumns($table, $normalize=true) added by smondino@users.sourceforge.net*/
+       function MetaColumns($table, $normalize=true
        {
        global $ADODB_FETCH_MODE;
        
@@ -281,8 +281,13 @@ NATSOFT.DOMAIN =
        {
                if (empty($d) && $d !== 0) return 'null';
                if ($isfld) return 'TO_DATE('.$d.",'".$this->dateformat."')";
+               
                if (is_string($d)) $d = ADORecordSet::UnixDate($d);
-               return "TO_DATE(".adodb_date($this->fmtDate,$d).",'".$this->dateformat."')";
+               
+               if (is_object($d)) $ds = $d->format($this->fmtDate);
+               else $ds = adodb_date($this->fmtDate,$d);
+               
+               return "TO_DATE(".$ds.",'".$this->dateformat."')";
        }
 
        function BindDate($d)
@@ -293,12 +298,15 @@ NATSOFT.DOMAIN =
                return substr($d,1,strlen($d)-2);
        }
        
-       function BindTimeStamp($d)
+       function BindTimeStamp($ts)
        {
-               $d = ADOConnection::DBTimeStamp($d);
-               if (strncmp($d,"'",1)) return $d;
+               if (empty($ts) && $ts !== 0) return 'null';
+               if (is_string($ts)) $ts = ADORecordSet::UnixTimeStamp($ts);
                
-               return substr($d,1,strlen($d)-2);
+               if (is_object($ts)) $tss = $ts->format("'Y-m-d H:i:s'");
+               else $tss = adodb_date("'Y-m-d H:i:s'",$ts);
+               
+               return $tss;
        }
        
        // format and return date string in database timestamp format
@@ -307,13 +315,17 @@ 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);
-               return 'TO_DATE('.adodb_date("'Y-m-d H:i:s'",$ts).",'RRRR-MM-DD, HH24:MI:SS')";
+               
+               if (is_object($ts)) $tss = $ts->format("'Y-m-d H:i:s'");
+               else $tss = adodb_date("'Y-m-d H:i:s'",$ts);
+               
+               return 'TO_DATE('.$tss.",'RRRR-MM-DD, HH24:MI:SS')";
        }
        
-       function RowLock($tables,$where,$flds='1 as ignore') 
+       function RowLock($tables,$where,$col='1 as ignore') 
        {
                if ($this->autoCommit) $this->BeginTrans();
-               return $this->GetOne("select $flds from $tables where $where for update");
+               return $this->GetOne("select $col from $tables where $where for update");
        }
        
        function MetaTables($ttype=false,$showSchema=false,$mask=false) 
@@ -1283,12 +1295,14 @@ SELECT /*+ RULE */ distinct b.column_name
                        return  "'".str_replace("'",$this->replaceQuote,$s)."'";
                }
                
-               // undo magic quotes for "
-               $s = str_replace('\\"','"',$s);
-               
-               $s = str_replace('\\\\','\\',$s);
-               return "'".str_replace("\\'",$this->replaceQuote,$s)."'";
-               
+               // undo magic quotes for " unless sybase is on
+               if (!ini_get('magic_quotes_sybase')) {
+                       $s = str_replace('\\"','"',$s);
+                       $s = str_replace('\\\\','\\',$s);
+                       return "'".str_replace("\\'",$this->replaceQuote,$s)."'";
+               } else {
+                       return "'".$s."'";
+               }
        }
        
 }
@@ -1546,7 +1560,7 @@ class ADORecordset_oci8 extends ADORecordSet {
                case 'NCHAR':
                case 'NVARCHAR':
                case 'NVARCHAR2':
-                                if (isset($this) && $len <= $this->blobSize) return 'C';
+                                if ($len <= $this->blobSize) return 'C';
                
                case 'NCLOB':
                case 'LONG':
@@ -1599,4 +1613,4 @@ class ADORecordSet_ext_oci8 extends ADORecordSet_oci8 {
                return adodb_movenext($this);
        }
 }
-?>
+?>
\ No newline at end of file
diff --git a/typo3/sysext/adodb/adodb/drivers/adodb-oci8.old.inc.php b/typo3/sysext/adodb/adodb/drivers/adodb-oci8.old.inc.php
deleted file mode 100644 (file)
index 6e63c2a..0000000
+++ /dev/null
@@ -1,1532 +0,0 @@
-<?php
-/*
-
-  version V5.04 13 Feb 2008  (c) 2000-2008 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.
-
-  Latest version is available at http://adodb.sourceforge.net
-  
-  Code contributed by George Fourlanos <fou@infomap.gr>
-  
-  13 Nov 2000 jlim - removed all ora_* references.
-*/
-
-// security - hide paths
-if (!defined('ADODB_DIR')) die();
-
-/*
-NLS_Date_Format
-Allows you to use a date format other than the Oracle Lite default. When a literal
-character string appears where a date value is expected, the Oracle Lite database
-tests the string to see if it matches the formats of Oracle, SQL-92, or the value
-specified for this parameter in the POLITE.INI file. Setting this parameter also
-defines the default format used in the TO_CHAR or TO_DATE functions when no
-other format string is supplied.
-
-For Oracle the default is dd-mon-yy or dd-mon-yyyy, and for SQL-92 the default is
-yy-mm-dd or yyyy-mm-dd.
-
-Using 'RR' in the format forces two-digit years less than or equal to 49 to be
-interpreted as years in the 21st century (2000\962049), and years over 50 as years in
-the 20th century (1950\961999). Setting the RR format as the default for all two-digit
-year entries allows you to become year-2000 compliant. For example:
-NLS_DATE_FORMAT='RR-MM-DD'
-
-You can also modify the date format using the ALTER SESSION command. 
-*/
-
-# define the LOB descriptor type for the given type
-# returns false if no LOB descriptor
-function oci_lob_desc($type) {
-       switch ($type) {
-               case OCI_B_BFILE: $result = OCI_D_FILE; break;
-               case OCI_B_CFILEE: $result = OCI_D_FILE; break;
-               case OCI_B_CLOB: $result = OCI_D_LOB; break;
-               case OCI_B_BLOB: $result = OCI_D_LOB; break;
-               case OCI_B_ROWID: $result = OCI_D_ROWID; break;
-               default: $result = false; break;
-       }
-       return $result;
-}
-
-class ADODB_oci8 extends ADOConnection {
-       var $databaseType = 'oci8';
-       var $dataProvider = 'oci8';
-       var $replaceQuote = "''"; // string to use to replace quotes
-       var $concat_operator='||';
-       var $sysDate = "TRUNC(SYSDATE)";
-       var $sysTimeStamp = 'SYSDATE';
-       var $metaDatabasesSQL = "SELECT USERNAME FROM ALL_USERS WHERE USERNAME NOT IN ('SYS','SYSTEM','DBSNMP','OUTLN') ORDER BY 1";
-       var $_stmt;
-       var $_commit = OCI_COMMIT_ON_SUCCESS;
-       var $_initdate = true; // init date to YYYY-MM-DD
-       var $metaTablesSQL = "select table_name,table_type from cat where table_type in ('TABLE','VIEW') and table_name not like 'BIN\$%'"; // bin$ tables are recycle bin tables
-       var $metaColumnsSQL = "select cname,coltype,width, SCALE, PRECISION, NULLS, DEFAULTVAL from col where tname='%s' order by colno"; //changed by smondino@users.sourceforge. net
-       var $_bindInputArray = true;
-       var $hasGenID = true;
-       var $_genIDSQL = "SELECT (%s.nextval) FROM DUAL";
-       var $_genSeqSQL = "CREATE SEQUENCE %s START WITH %s";
-       var $_dropSeqSQL = "DROP SEQUENCE %s";
-       var $hasAffectedRows = true;
-       var $random = "abs(mod(DBMS_RANDOM.RANDOM,10000001)/10000000)";
-       var $noNullStrings = false;
-       var $connectSID = false;
-       var $_bind = false;
-       var $_nestedSQL = true;
-       var $_hasOCIFetchStatement = false;
-       var $_getarray = false; // currently not working
-       var $leftOuter = '';  // oracle wierdness, $col = $value (+) for LEFT OUTER, $col (+)= $value for RIGHT OUTER
-       var $session_sharing_force_blob = false; // alter session on updateblob if set to true 
-       var $firstrows = true; // enable first rows optimization on SelectLimit()
-       var $selectOffsetAlg1 = 100; // when to use 1st algorithm of selectlimit.
-       var $NLS_DATE_FORMAT = 'YYYY-MM-DD';  // To include time, use 'RRRR-MM-DD HH24:MI:SS'
-       var $dateformat = 'YYYY-MM-DD'; // DBDate format
-       var $useDBDateFormatForTextInput=false;
-       var $datetime = false; // MetaType('DATE') returns 'D' (datetime==false) or 'T' (datetime == true)
-       var $_refLOBs = array();
-               
-       // var $ansiOuter = true; // if oracle9
-    
-       function ADODB_oci8() 
-       {
-               $this->_hasOCIFetchStatement = ADODB_PHPVER >= 0x4200;
-               if (defined('ADODB_EXTENSION')) $this->rsPrefix .= 'ext_';
-       }
-       
-       /*  function MetaColumns($table) added by smondino@users.sourceforge.net*/
-       function MetaColumns($table) 
-       {
-       global $ADODB_FETCH_MODE;
-       
-               $false = false;
-               $save = $ADODB_FETCH_MODE;
-               $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
-               if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
-               
-               $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table)));
-               
-               if (isset($savem)) $this->SetFetchMode($savem);
-               $ADODB_FETCH_MODE = $save;
-               if (!$rs) {
-                       return $false;
-               }
-               $retarr = array();
-               while (!$rs->EOF) { //print_r($rs->fields);
-                       $fld = new ADOFieldObject();
-                       $fld->name = $rs->fields[0];
-                       $fld->type = $rs->fields[1];
-                       $fld->max_length = $rs->fields[2];
-                       $fld->scale = $rs->fields[3];
-                       if ($rs->fields[1] == 'NUMBER') {
-                               if ($rs->fields[3] == 0) $fld->type = 'INT';
-                       $fld->max_length = $rs->fields[4];
-               }       
-                       $fld->not_null = (strncmp($rs->fields[5], 'NOT',3) === 0);
-                       $fld->binary = (strpos($fld->type,'BLOB') !== false);
-                       $fld->default_value = $rs->fields[6];
-                       
-                       if ($ADODB_FETCH_MODE == ADODB_FETCH_NUM) $retarr[] = $fld;     
-                       else $retarr[strtoupper($fld->name)] = $fld;
-                       $rs->MoveNext();
-               }
-               $rs->Close();
-               if (empty($retarr))
-                       return  $false;
-               else 
-                       return $retarr;
-       }
-       
-       function Time()
-       {
-               $rs = $this->Execute("select TO_CHAR($this->sysTimeStamp,'YYYY-MM-DD HH24:MI:SS') from dual");
-               if ($rs && !$rs->EOF) return $this->UnixTimeStamp(reset($rs->fields));
-               
-               return false;
-       }
-/*
-
-  Multiple modes of connection are supported:
-  
-  a. Local Database
-    $conn->Connect(false,'scott','tiger');
-  
-  b. From tnsnames.ora
-    $conn->Connect(false,'scott','tiger',$tnsname); 
-    $conn->Connect($tnsname,'scott','tiger'); 
-  
-  c. Server + service name
-    $conn->Connect($serveraddress,'scott,'tiger',$service_name);
-  
-  d. Server + SID
-       $conn->connectSID = true;
-       $conn->Connect($serveraddress,'scott,'tiger',$SID);
-
-
-Example TNSName:
----------------
-NATSOFT.DOMAIN =
-  (DESCRIPTION =
-       (ADDRESS_LIST =
-         (ADDRESS = (PROTOCOL = TCP)(HOST = kermit)(PORT = 1523))
-       )
-       (CONNECT_DATA =
-         (SERVICE_NAME = natsoft.domain)
-       )
-  )
-  
-  There are 3 connection modes, 0 = non-persistent, 1 = persistent, 2 = force new connection
-       
-*/
-       function _connect($argHostname, $argUsername, $argPassword, $argDatabasename,$mode=0)
-       {
-               if (!function_exists('OCIPLogon')) return null;
-               
-               
-        $this->_errorMsg = false;
-               $this->_errorCode = false;
-               
-               if($argHostname) { // added by Jorma Tuomainen <jorma.tuomainen@ppoy.fi>
-                       if (empty($argDatabasename)) $argDatabasename = $argHostname;
-                       else {
-                               if(strpos($argHostname,":")) {
-                                       $argHostinfo=explode(":",$argHostname);
-                                       $argHostname=$argHostinfo[0];
-                                       $argHostport=$argHostinfo[1];
-                               } else {
-                                       $argHostport = empty($this->port)?  "1521" : $this->port;
-                               }
-                               
-                               if ($this->connectSID) {
-                                       $argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname
-                                       .")(PORT=$argHostport))(CONNECT_DATA=(SID=$argDatabasename)))";
-                               } else
-                                       $argDatabasename="(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=".$argHostname
-                                       .")(PORT=$argHostport))(CONNECT_DATA=(SERVICE_NAME=$argDatabasename)))";
-                       }
-               }
-                               
-               //if ($argHostname) print "<p>Connect: 1st argument should be left blank for $this->databaseType</p>";
-               if ($mode==1) {
-                       $this->_connectionID = ($this->charSet) ? 
-                               OCIPLogon($argUsername,$argPassword, $argDatabasename,$this->charSet)
-                               :
-                               OCIPLogon($argUsername,$argPassword, $argDatabasename)
-                               ;
-                       if ($this->_connectionID && $this->autoRollback)  OCIrollback($this->_connectionID);
-               } else if ($mode==2) {
-                       $this->_connectionID = ($this->charSet) ? 
-                               OCINLogon($argUsername,$argPassword, $argDatabasename,$this->charSet)
-                               :
-                               OCINLogon($argUsername,$argPassword, $argDatabasename);
-                               
-               } else {
-                       $this->_connectionID = ($this->charSet) ? 
-                               OCILogon($argUsername,$argPassword, $argDatabasename,$this->charSet)
-                               :
-                               OCILogon($argUsername,$argPassword, $argDatabasename);
-               }
-               if (!$this->_connectionID) return false;
-               if ($this->_initdate) {
-                       $this->Execute("ALTER SESSION SET NLS_DATE_FORMAT='".$this->NLS_DATE_FORMAT."'");
-               }
-               
-               // looks like: 
-               // Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production With the Partitioning option JServer Release 8.1.7.0.0 - Production
-               // $vers = OCIServerVersion($this->_connectionID);
-               // if (strpos($vers,'8i') !== false) $this->ansiOuter = true;
-               return true;
-       }
-       
-       function ServerInfo()
-       {
-               $arr['compat'] = $this->GetOne('select value from sys.database_compatible_level');
-               $arr['description'] = @OCIServerVersion($this->_connectionID);
-               $arr['version'] = ADOConnection::_findvers($arr['description']);
-               return $arr;
-       }
-               // returns true or false
-       function _pconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
-       {
-               return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,1);
-       }
-       
-       // returns true or false
-       function _nconnect($argHostname, $argUsername, $argPassword, $argDatabasename)
-       {
-               return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename,2);
-       }
-       
-       function _affectedrows()
-       {
-               if (is_resource($this->_stmt)) return @OCIRowCount($this->_stmt);
-               return 0;
-       }
-       
-       function IfNull( $field, $ifNull ) 
-       {
-               return " NVL($field, $ifNull) "; // if Oracle
-       }
-       
-       // format and return date string in database date format
-       function DBDate($d)
-       {
-               if (empty($d) && $d !== 0) return 'null';
-               
-               if (is_string($d)) $d = ADORecordSet::UnixDate($d);
-               return "TO_DATE(".adodb_date($this->fmtDate,$d).",'".$this->dateformat."')";
-       }
-
-       function BindDate($d)
-       {
-               $d = ADOConnection::DBDate($d);
-               if (strncmp($d,"'",1)) return $d;
-               
-               return substr($d,1,strlen($d)-2);
-       }
-       
-       function BindTimeStamp($d)
-       {
-               $d = ADOConnection::DBTimeStamp($d);
-               if (strncmp($d,"'",1)) return $d;
-               
-               return substr($d,1,strlen($d)-2);
-       }
-       
-       // format and return date string in database timestamp format
-       function DBTimeStamp($ts)
-       {
-               if (empty($ts) && $ts !== 0) return 'null';
-               if (is_string($ts)) $ts = ADORecordSet::UnixTimeStamp($ts);
-               return 'TO_DATE('.adodb_date("'Y-m-d H:i:s'",$ts).",'RRRR-MM-DD, HH24:MI:SS')";
-       }
-       
-       function RowLock($tables,$where,$flds='1 as ignore') 
-       {
-               if ($this->autoCommit) $this->BeginTrans();
-               return $this->GetOne("select $flds from $tables where $where for update");
-       }
-       
-       function MetaTables($ttype=false,$showSchema=false,$mask=false) 
-       {
-               if ($mask) {
-                       $save = $this->metaTablesSQL;
-                       $mask = $this->qstr(strtoupper($mask));
-                       $this->metaTablesSQL .= " AND upper(table_name) like $mask";
-               }
-               $ret = ADOConnection::MetaTables($ttype,$showSchema);
-               
-               if ($mask) {
-                       $this->metaTablesSQL = $save;
-               }
-               return $ret;
-       }
-       
-       // Mark Newnham 
-       function MetaIndexes ($table, $primary = FALSE, $owner=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);
-        }
-
-               // get index details
-               $table = strtoupper($table);
-
-               // get Primary index
-               $primary_key = '';
-
-               $false = false;
-               $rs = $this->Execute(sprintf("SELECT * FROM ALL_CONSTRAINTS WHERE UPPER(TABLE_NAME)='%s' AND CONSTRAINT_TYPE='P'",$table));
-               if ($row = $rs->FetchRow())
-                  $primary_key = $row[1]; //constraint_name
-
-               if ($primary==TRUE && $primary_key=='') {
-                        if (isset($savem)) 
-                $this->SetFetchMode($savem);
-                       $ADODB_FETCH_MODE = $save;
-                       return $false; //There is no primary key
-               }
-
-        $rs = $this->Execute(sprintf("SELECT ALL_INDEXES.INDEX_NAME, ALL_INDEXES.UNIQUENESS, ALL_IND_COLUMNS.COLUMN_POSITION, ALL_IND_COLUMNS.COLUMN_NAME FROM ALL_INDEXES,ALL_IND_COLUMNS WHERE UPPER(ALL_INDEXES.TABLE_NAME)='%s' AND ALL_IND_COLUMNS.INDEX_NAME=ALL_INDEXES.INDEX_NAME",$table));
-
-               
-        if (!is_object($rs)) {
-                       if (isset($savem)) 
-                               $this->SetFetchMode($savem);
-                       $ADODB_FETCH_MODE = $save;
-            return $false;
-        }
-
-               $indexes = array ();
-        // parse index data into array
-
-        while ($row = $rs->FetchRow()) {
-                       if ($primary && $row[0] != $primary_key) continue;
-            if (!isset($indexes[$row[0]])) {
-                               $indexes[$row[0]] = array(
-                                  'unique' => ($row[1] == 'UNIQUE'),
-                                  'columns' => array()
-                               );
-            }
-            $indexes[$row[0]]['columns'][$row[2] - 1] = $row[3];
-        }
-
-        // sort columns by order in the index
-        foreach ( array_keys ($indexes) as $index ) {
-            ksort ($indexes[$index]['columns']);
-        }
-
-               if (isset($savem)) { 
-            $this->SetFetchMode($savem);
-                       $ADODB_FETCH_MODE = $save;
-               }
-        return $indexes;
-       }
-       
-       function BeginTrans()
-       {       
-               if ($this->transOff) return true;
-               $this->transCnt += 1;
-               $this->autoCommit = false;
-               $this->_commit = OCI_DEFAULT;
-               
-               if ($this->_transmode) $this->Execute("SET TRANSACTION ".$this->_transmode);
-               return true;
-       }
-       
-       function CommitTrans($ok=true) 
-       { 
-               if ($this->transOff) return true;
-               if (!$ok) return $this->RollbackTrans();
-               
-               if ($this->transCnt) $this->transCnt -= 1;
-               $ret = OCIcommit($this->_connectionID);
-               $this->_commit = OCI_COMMIT_ON_SUCCESS;
-               $this->autoCommit = true;
-               return $ret;
-       }
-       
-       function RollbackTrans()
-       {
-               if ($this->transOff) return true;
-               if ($this->transCnt) $this->transCnt -= 1;
-               $ret = OCIrollback($this->_connectionID);
-               $this->_commit = OCI_COMMIT_ON_SUCCESS;
-               $this->autoCommit = true;
-               return $ret;
-       }
-       
-       
-       function SelectDB($dbName) 
-       {
-               return false;
-       }
-
-       function ErrorMsg() 
-       {
-               if ($this->_errorMsg !== false) return $this->_errorMsg;
-
-               if (is_resource($this->_stmt)) $arr = @OCIError($this->_stmt);
-               if (empty($arr)) {
-                       if (is_resource($this->_connectionID)) $arr = @OCIError($this->_connectionID);
-                       else $arr = @OCIError();
-                       if ($arr === false) return '';
-               }
-               $this->_errorMsg = $arr['message'];
-               $this->_errorCode = $arr['code'];
-               return $this->_errorMsg;
-       }
-
-       function ErrorNo() 
-       {
-               if ($this->_errorCode !== false) return $this->_errorCode;
-               
-               if (is_resource($this->_stmt)) $arr = @OCIError($this->_stmt);
-               if (empty($arr)) {
-                       $arr = @OCIError($this->_connectionID);
-                       if ($arr == false) $arr = @OCIError();
-                       if ($arr == false) return '';
-               }
-               
-               $this->_errorMsg = $arr['message'];
-               $this->_errorCode = $arr['code'];
-               
-               return $arr['code'];
-       }
-       
-       // Format date column in sql string given an input format that understands Y M D
-       function SQLDate($fmt, $col=false)
-       {       
-               if (!$col) $col = $this->sysTimeStamp;
-               $s = 'TO_CHAR('.$col.",'";
-               
-               $len = strlen($fmt);
-               for ($i=0; $i < $len; $i++) {
-                       $ch = $fmt[$i];
-                       switch($ch) {
-                       case 'Y':
-                       case 'y':
-                               $s .= 'YYYY';
-                               break;
-                       case 'Q':
-                       case 'q':
-                               $s .= 'Q';
-                               break;
-                               
-                       case 'M':
-                               $s .= 'Mon';
-                               break;
-                               
-                       case 'm':
-                               $s .= 'MM';
-                               break;
-                       case 'D':
-                       case 'd':
-                               $s .= 'DD';
-                               break;
-                       
-                       case 'H':
-                               $s.= 'HH24';
-                               break;
-                               
-                       case 'h':
-                               $s .= 'HH';
-                               break;
-                               
-                       case 'i':
-                               $s .= 'MI';
-                               break;
-                       
-                       case 's':
-                               $s .= 'SS';
-                               break;
-                       
-                       case 'a':
-                       case 'A':
-                               $s .= 'AM';
-                               break;
-                               
-                       case 'w':
-                               $s .= 'D';
-                               break;
-                               
-                       case 'l':
-                               $s .= 'DAY';
-                               break;
-                               
-                        case 'W':
-                               $s .= 'WW';
-                               break;
-                               
-                       default:
-                       // handle escape characters...
-                               if ($ch == '\\') {
-                                       $i++;
-                                       $ch = substr($fmt,$i,1);
-                               }
-                               if (strpos('-/.:;, ',$ch) !== false) $s .= $ch;
-                               else $s .= '"'.$ch.'"';
-                               
-                       }
-               }
-               return $s. "')";
-       }
-       
-       function GetRandRow($sql, $arr = false)
-       {
-               $sql = "SELECT * FROM ($sql ORDER BY dbms_random.value) WHERE rownum = 1";
-               
-               return $this->GetRow($sql,$arr);
-       }
-       
-       /*
-       This algorithm makes use of
-       
-       a. FIRST_ROWS hint
-       The FIRST_ROWS hint explicitly chooses the approach to optimize response time, 
-       that is, minimum resource usage to return the first row. Results will be returned 
-       as soon as they are identified. 
-
-       b. Uses rownum tricks to obtain only the required rows from a given offset.
-        As this uses complicated sql statements, we only use this if the $offset >= 100. 
-        This idea by Tomas V V Cox.
-        
-        This implementation does not appear to work with oracle 8.0.5 or earlier. Comment
-        out this function then, and the slower SelectLimit() in the base class will be used.
-       */
-       function SelectLimit($sql,$nrows=-1,$offset=-1, $inputarr=false,$secs2cache=0)
-       {
-               // seems that oracle only supports 1 hint comment in 8i
-               if ($this->firstrows) {
-                       if (strpos($sql,'/*+') !== false)
-                               $sql = str_replace('/*+ ','/*+FIRST_ROWS ',$sql);
-                       else
-                               $sql = preg_replace('/^[ \t\n]*select/i','SELECT /*+FIRST_ROWS*/',$sql);
-               }
-               
-               if ($offset < $this->selectOffsetAlg1 && 0 < $nrows && $nrows < 1000) {
-                       if ($nrows > 0) {       
-                               if ($offset > 0) $nrows += $offset;
-                               //$inputarr['adodb_rownum'] = $nrows;
-                               if ($this->databaseType == 'oci8po') {
-                                       $sql = "select * from (".$sql.") where rownum <= ?";
-                               } else {
-                                       $sql = "select * from (".$sql.") where rownum <= :adodb_offset";
-                               } 
-                               $inputarr['adodb_offset'] = $nrows;
-                               $nrows = -1;
-                       }
-                       // note that $nrows = 0 still has to work ==> no rows returned
-
-                       $rs = ADOConnection::SelectLimit($sql,$nrows,$offset,$inputarr,$secs2cache);
-                       return $rs;
-                       
-               } else {
-                        // Algorithm by Tomas V V Cox, from PEAR DB oci8.php
-                       
-                        // Let Oracle return the name of the columns
-                       $q_fields = "SELECT * FROM (".$sql.") WHERE NULL = NULL";
-                        
-                       $false = false;
-                       if (! $stmt_arr = $this->Prepare($q_fields)) {
-                               return $false;
-                       }
-                       $stmt = $stmt_arr[1];
-                        
-                        if (is_array($inputarr)) {
-                               foreach($inputarr as $k => $v) {
-                                       if (is_array($v)) {
-                                               if (sizeof($v) == 2) // suggested by g.giunta@libero.
-                                                       OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1]);
-                                               else
-                                                       OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]);
-                                       } else {
-                                               $len = -1;
-                                               if ($v === ' ') $len = 1;
-                                               if (isset($bindarr)) {  // is prepared sql, so no need to ocibindbyname again
-                                                       $bindarr[$k] = $v;
-                                               } else {                                // dynamic sql, so rebind every time
-                                                       OCIBindByName($stmt,":$k",$inputarr[$k],$len);
-                                               }
-                                       }
-                               }
-                       }
-                       
-                        if (!OCIExecute($stmt, OCI_DEFAULT)) {
-                                OCIFreeStatement($stmt); 
-                                return $false;
-                        }
-                        
-                        $ncols = OCINumCols($stmt);
-                        for ( $i = 1; $i <= $ncols; $i++ ) {
-                                $cols[] = '"'.OCIColumnName($stmt, $i).'"';
-                        }
-                        $result = false;
-                       
-                        OCIFreeStatement($stmt); 
-                        $fields = implode(',', $cols);
-                        $nrows += $offset;
-                        $offset += 1; // in Oracle rownum starts at 1
-                       
-                       if ($this->databaseType == 'oci8po') {
-                                        $sql = "SELECT $fields FROM".
-                                         "(SELECT rownum as adodb_rownum, $fields FROM".
-                                         " ($sql) WHERE rownum <= ?".
-                                         ") WHERE adodb_rownum >= ?";
-                               } else {
-                                        $sql = "SELECT $fields FROM".
-                                         "(SELECT rownum as adodb_rownum, $fields FROM".
-                                         " ($sql) WHERE rownum <= :adodb_nrows".
-                                         ") WHERE adodb_rownum >= :adodb_offset";
-                               } 
-                               $inputarr['adodb_nrows'] = $nrows;
-                               $inputarr['adodb_offset'] = $offset;
-                               
-                       if ($secs2cache>0) $rs = $this->CacheExecute($secs2cache, $sql,$inputarr);
-                       else $rs = $this->Execute($sql,$inputarr);
-                       return $rs;
-               }
-       
-       }
-       
-       /**
-       * Usage:
-       * Store BLOBs and CLOBs
-       *
-       * Example: to store $var in a blob
-       *
-       *       $conn->Execute('insert into TABLE (id,ablob) values(12,empty_blob())');
-       *       $conn->UpdateBlob('TABLE', 'ablob', $varHoldingBlob, 'ID=12', 'BLOB');
-       *       
-       *       $blobtype supports 'BLOB' and 'CLOB', but you need to change to 'empty_clob()'.
-       *
-       *  to get length of LOB:
-       *       select DBMS_LOB.GETLENGTH(ablob) from TABLE
-       *
-       * If you are using CURSOR_SHARING = force, it appears this will case a segfault
-       * under oracle 8.1.7.0. Run:
-       *        $db->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT');
-       * before UpdateBlob() then...
-       */
-
-       function UpdateBlob($table,$column,$val,$where,$blobtype='BLOB')
-       {
-               
-               //if (strlen($val) < 4000) return $this->Execute("UPDATE $table SET $column=:blob WHERE $where",array('blob'=>$val)) != false;
-               
-               switch(strtoupper($blobtype)) {
-               default: ADOConnection::outp("<b>UpdateBlob</b>: Unknown blobtype=$blobtype"); return false;
-               case 'BLOB': $type = OCI_B_BLOB; break;
-               case 'CLOB': $type = OCI_B_CLOB; break;
-               }
-               
-               if ($this->databaseType == 'oci8po') 
-                       $sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO ?";
-               else 
-                       $sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob";
-               
-               $desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB);
-               $arr['blob'] = array($desc,-1,$type);
-               if ($this->session_sharing_force_blob) $this->Execute('ALTER SESSION SET CURSOR_SHARING=EXACT');
-               $commit = $this->autoCommit;
-               if ($commit) $this->BeginTrans();
-               $rs = $this->_Execute($sql,$arr);
-               if ($rez = !empty($rs)) $desc->save($val);
-               $desc->free();
-               if ($commit) $this->CommitTrans();
-               if ($this->session_sharing_force_blob) $this->Execute('ALTER SESSION SET CURSOR_SHARING=FORCE');
-               
-               if ($rez) $rs->Close();
-               return $rez;
-       }
-       
-       /**
-       * Usage:  store file pointed to by $var in a blob
-       */
-       function UpdateBlobFile($table,$column,$val,$where,$blobtype='BLOB')
-       {
-               switch(strtoupper($blobtype)) {
-               default: ADOConnection::outp( "<b>UpdateBlob</b>: Unknown blobtype=$blobtype"); return false;
-               case 'BLOB': $type = OCI_B_BLOB; break;
-               case 'CLOB': $type = OCI_B_CLOB; break;
-               }
-               
-               if ($this->databaseType == 'oci8po') 
-                       $sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO ?";
-               else 
-                       $sql = "UPDATE $table set $column=EMPTY_{$blobtype}() WHERE $where RETURNING $column INTO :blob";
-               
-               $desc = OCINewDescriptor($this->_connectionID, OCI_D_LOB);
-               $arr['blob'] = array($desc,-1,$type);
-               
-               $this->BeginTrans();
-               $rs = ADODB_oci8::Execute($sql,$arr);
-               if ($rez = !empty($rs)) $desc->savefile($val);
-               $desc->free();
-               $this->CommitTrans();
-               
-               if ($rez) $rs->Close();
-               return $rez;
-       }
-
-               /**
-        * Execute SQL 
-        *
-        * @param sql           SQL statement to execute, or possibly an array holding prepared statement ($sql[0] will hold sql text)
-        * @param [inputarr]    holds the input data to bind to. Null elements will be set to null.
-        * @return              RecordSet or false
-        */
-       function Execute($sql,$inputarr=false) 
-       {
-               if ($this->fnExecute) {
-                       $fn = $this->fnExecute;
-                       $ret = $fn($this,$sql,$inputarr);
-                       if (isset($ret)) return $ret;
-               }
-               if ($inputarr) {
-                       #if (!is_array($inputarr)) $inputarr = array($inputarr);
-                       
-                       $element0 = reset($inputarr);
-                       
-                       # is_object check because oci8 descriptors can be passed in
-                       if (is_array($element0) && !is_object(reset($element0))) {
-                               if (is_string($sql))
-                                       $stmt = $this->Prepare($sql);
-                               else
-                                       $stmt = $sql;
-                                       
-                               foreach($inputarr as $arr) {
-                                       $ret = $this->_Execute($stmt,$arr);
-                                       if (!$ret) return $ret;
-                               }
-                       } else {
-                               $ret = $this->_Execute($sql,$inputarr);
-                       }
-                       
-               } else {
-                       $ret = $this->_Execute($sql,false);
-               }
-
-               return $ret;
-       }
-       
-       /*
-               Example of usage:
-               
-               $stmt = $this->Prepare('insert into emp (empno, ename) values (:empno, :ename)');
-       */
-       function Prepare($sql,$cursor=false)
-       {
-       static $BINDNUM = 0;
-       
-               $stmt = OCIParse($this->_connectionID,$sql);
-
-               if (!$stmt) {
-                       $this->_errorMsg = false;
-                       $this->_errorCode = false;
-                       $arr = @OCIError($this->_connectionID);
-                       if ($arr === false) return false;
-               
-                       $this->_errorMsg = $arr['message'];
-                       $this->_errorCode = $arr['code'];
-                       return false;
-               }
-               
-               $BINDNUM += 1;
-               
-               $sttype = @OCIStatementType($stmt);
-               if ($sttype == 'BEGIN' || $sttype == 'DECLARE') {
-                       return array($sql,$stmt,0,$BINDNUM, ($cursor) ? OCINewCursor($this->_connectionID) : false);
-               }
-               return array($sql,$stmt,0,$BINDNUM);
-       }
-       
-       /*
-               Call an oracle stored procedure and returns a cursor variable as a recordset. 
-               Concept by Robert Tuttle robert@ud.com
-               
-               Example:
-                       Note: we return a cursor variable in :RS2
-                       $rs = $db->ExecuteCursor("BEGIN adodb.open_tab(:RS2); END;",'RS2');
-                       
-                       $rs = $db->ExecuteCursor(
-                               "BEGIN :RS2 = adodb.getdata(:VAR1); END;", 
-                               'RS2',
-                               array('VAR1' => 'Mr Bean'));
-                       
-       */
-       function ExecuteCursor($sql,$cursorName='rs',$params=false)
-       {
-               if (is_array($sql)) $stmt = $sql;
-               else $stmt = ADODB_oci8::Prepare($sql,true); # true to allocate OCINewCursor
-       
-               if (is_array($stmt) && sizeof($stmt) >= 5) {
-                       $hasref = true;
-                       $ignoreCur = false;
-                       $this->Parameter($stmt, $ignoreCur, $cursorName, false, -1, OCI_B_CURSOR);
-                       if ($params) {
-                               foreach($params as $k => $v) {
-                                       $this->Parameter($stmt,$params[$k], $k);
-                               }
-                       }
-               } else
-                       $hasref = false;
-                       
-               $rs = $this->Execute($stmt);
-               if ($rs) {
-                       if ($rs->databaseType == 'array') OCIFreeCursor($stmt[4]);
-                       else if ($hasref) $rs->_refcursor = $stmt[4];
-               }
-               return $rs;
-       }
-       
-       /*
-               Bind a variable -- very, very fast for executing repeated statements in oracle. 
-               Better than using
-                       for ($i = 0; $i < $max; $i++) { 
-                               $p1 = ?; $p2 = ?; $p3 = ?;
-                               $this->Execute("insert into table (col0, col1, col2) values (:0, :1, :2)", 
-                                       array($p1,$p2,$p3));
-                       }
-               
-               Usage:
-                       $stmt = $DB->Prepare("insert into table (col0, col1, col2) values (:0, :1, :2)");
-                       $DB->Bind($stmt, $p1);
-                       $DB->Bind($stmt, $p2);
-                       $DB->Bind($stmt, $p3);
-                       for ($i = 0; $i < $max; $i++) { 
-                               $p1 = ?; $p2 = ?; $p3 = ?;
-                               $DB->Execute($stmt);
-                       }
-                       
-               Some timings:           
-                       ** Test table has 3 cols, and 1 index. Test to insert 1000 records
-                       Time 0.6081s (1644.60 inserts/sec) with direct OCIParse/OCIExecute
-                       Time 0.6341s (1577.16 inserts/sec) with ADOdb Prepare/Bind/Execute
-                       Time 1.5533s ( 643.77 inserts/sec) with pure SQL using Execute
-                       
-               Now if PHP only had batch/bulk updating like Java or PL/SQL...
-       
-               Note that the order of parameters differs from OCIBindByName,
-               because we default the names to :0, :1, :2
-       */
-       function Bind(&$stmt,&$var,$size=4000,$type=false,$name=false,$isOutput=false)
-       {
-               
-               if (!is_array($stmt)) return false;
-        
-        if (($type == OCI_B_CURSOR) && sizeof($stmt) >= 5) { 
-            return OCIBindByName($stmt[1],":".$name,$stmt[4],$size,$type);
-        }
-        
-               if ($name == false) {
-                       if ($type !== false) $rez = OCIBindByName($stmt[1],":".$stmt[2],$var,$size,$type);
-                       else $rez = OCIBindByName($stmt[1],":".$stmt[2],$var,$size); // +1 byte for null terminator
-                       $stmt[2] += 1;
-               } else if (oci_lob_desc($type)) {
-                       if ($this->debug) {
-                               ADOConnection::outp("<b>Bind</b>: name = $name");
-                       }
-            //we have to create a new Descriptor here
-                       $numlob = count($this->_refLOBs);
-               $this->_refLOBs[$numlob]['LOB'] = OCINewDescriptor($this->_connectionID, oci_lob_desc($type));
-                       $this->_refLOBs[$numlob]['TYPE'] = $isOutput;
-                       
-                       $tmp = $this->_refLOBs[$numlob]['LOB'];
-               $rez = OCIBindByName($stmt[1], ":".$name, $tmp, -1, $type);
-                       if ($this->debug) {
-                               ADOConnection::outp("<b>Bind</b>: descriptor has been allocated, var (".$name.") binded");
-                       }
-                       
-                       // if type is input then write data to lob now
-                       if ($isOutput == false) {
-                               $var = $this->BlobEncode($var);
-                               $tmp->WriteTemporary($var);
-                               $this->_refLOBs[$numlob]['VAR'] = $var;
-                               if ($this->debug) {
-                                       ADOConnection::outp("<b>Bind</b>: LOB has been written to temp");
-                               }
-                       } else {
-                               $this->_refLOBs[$numlob]['VAR'] = $var;
-                       }
-                       $rez = $tmp;
-               } else {
-                       if ($this->debug) 
-                               ADOConnection::outp("<b>Bind</b>: name = $name");
-                       
-                       if ($type !== false) $rez = OCIBindByName($stmt[1],":".$name,$var,$size,$type);
-                       else $rez = OCIBindByName($stmt[1],":".$name,$var,$size); // +1 byte for null terminator
-               }
-               
-               return $rez;
-       }
-       
-       function Param($name,$type=false)
-       {
-               return ':'.$name;
-       }
-       
-       /* 
-       Usage:
-               $stmt = $db->Prepare('select * from table where id =:myid and group=:group');
-               $db->Parameter($stmt,$id,'myid');
-               $db->Parameter($stmt,$group,'group');
-               $db->Execute($stmt);
-               
-               @param $stmt Statement returned by Prepare() or PrepareSP().
-               @param $var PHP variable to bind to
-               @param $name Name of stored procedure variable name to bind to.
-               @param [$isOutput] Indicates direction of parameter 0/false=IN  1=OUT  2= IN/OUT. This is ignored in oci8.
-               @param [$maxLen] Holds an maximum length of the variable.
-               @param [$type] The data type of $var. Legal values depend on driver.
-               
-               See OCIBindByName documentation at php.net.
-       */
-       function Parameter(&$stmt,&$var,$name,$isOutput=false,$maxLen=4000,$type=false)
-       {
-                       if  ($this->debug) {
-                               $prefix = ($isOutput) ? 'Out' : 'In';
-                               $ztype = (empty($type)) ? 'false' : $type;
-                               ADOConnection::outp( "{$prefix}Parameter(\$stmt, \$php_var='$var', \$name='$name', \$maxLen=$maxLen, \$type=$ztype);");
-                       }
-                       return $this->Bind($stmt,$var,$maxLen,$type,$name,$isOutput);
-       }
-       
-       /*
-       returns query ID if successful, otherwise false
-       this version supports:
-       
-          1. $db->execute('select * from table');
-          
-          2. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)');
-                 $db->execute($prepared_statement, array(1,2,3));
-                 
-          3. $db->execute('insert into table (a,b,c) values (:a,:b,:c)',array('a'=>1,'b'=>2,'c'=>3));
-          
-          4. $db->prepare('insert into table (a,b,c) values (:0,:1,:2)');
-                 $db->bind($stmt,1); $db->bind($stmt,2); $db->bind($stmt,3); 
-                 $db->execute($stmt);
-       */ 
-       function _query($sql,$inputarr)
-       {
-               if (is_array($sql)) { // is prepared sql
-                       $stmt = $sql[1];
-                       
-                       // we try to bind to permanent array, so that OCIBindByName is persistent
-                       // and carried out once only - note that max array element size is 4000 chars
-                       if (is_array($inputarr)) {
-                               $bindpos = $sql[3];
-                               if (isset($this->_bind[$bindpos])) {
-                               // all tied up already
-                                       $bindarr = $this->_bind[$bindpos];
-                               } else {
-                               // one statement to bind them all
-                                       $bindarr = array();
-                                       foreach($inputarr as $k => $v) {
-                                               $bindarr[$k] = $v;
-                                               OCIBindByName($stmt,":$k",$bindarr[$k],is_string($v) && strlen($v)>4000 ? -1 : 4000);
-                                       }
-                                       $this->_bind[$bindpos] = $bindarr;
-                               }
-                       }
-               } else {
-                       $stmt=OCIParse($this->_connectionID,$sql);
-               }
-                       
-               $this->_stmt = $stmt;
-               if (!$stmt) return false;
-       
-               if (defined('ADODB_PREFETCH_ROWS')) @OCISetPrefetch($stmt,ADODB_PREFETCH_ROWS);
-                       
-               if (is_array($inputarr)) {
-                       foreach($inputarr as $k => $v) {
-                               if (is_array($v)) {
-                                       if (sizeof($v) == 2) // suggested by g.giunta@libero.
-                                               OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1]);
-                                       else
-                                               OCIBindByName($stmt,":$k",$inputarr[$k][0],$v[1],$v[2]);
-                                       
-                                       if ($this->debug==99) {
-                                               if (is_object($v[0])) 
-                                                       echo "name=:$k",' len='.$v[1],' type='.$v[2],'<br>';
-                                               else
-                                                       echo "name=:$k",' var='.$inputarr[$k][0],' len='.$v[1],' type='.$v[2],'<br>';
-                                               
-                                       }
-                               } else {
-                                       $len = -1;
-                                       if ($v === ' ') $len = 1;
-                                       if (isset($bindarr)) {  // is prepared sql, so no need to ocibindbyname again
-                                               $bindarr[$k] = $v;
-                                       } else {                                // dynamic sql, so rebind every time
-                                               OCIBindByName($stmt,":$k",$inputarr[$k],$len);
-                                       }
-                               }
-                       }
-               }
-               
-        $this->_errorMsg = false;
-               $this->_errorCode = false;
-               if (OCIExecute($stmt,$this->_commit)) {
-//OCIInternalDebug(1);                 
-                       if (count($this -> _refLOBs) > 0) {
-               
-                               foreach ($this -> _refLOBs as $key => $value) {
-                                       if ($this -> _refLOBs[$key]['TYPE'] == true) {
-                                               $tmp = $this -> _refLOBs[$key]['LOB'] -> load();
-                                               if ($this -> debug) {
-                                                       ADOConnection::outp("<b>OUT LOB</b>: LOB has been loaded. <br>");
-                                               }
-                                               //$_GLOBALS[$this -> _refLOBs[$key]['VAR']] = $tmp;
-                                               $this -> _refLOBs[$key]['VAR'] = $tmp;
-                                       } else {
-                        $this->_refLOBs[$key]['LOB']->save($this->_refLOBs[$key]['VAR']);
-                                               $this -> _refLOBs[$key]['LOB']->free();
-                                               unset($this -> _refLOBs[$key]);
-                        if ($this->debug) {
-                                                       ADOConnection::outp("<b>IN LOB</b>: LOB has been saved. <br>");
-                                               }
-                    }                                  
-                               }
-                       }
-               
-            switch (@OCIStatementType($stmt)) {
-                case "SELECT":
-                                       return $stmt;
-                               
-                               case 'DECLARE':
-                case "BEGIN":
-                    if (is_array($sql) && !empty($sql[4])) {
-                                               $cursor = $sql[4];
-                                               if (is_resource($cursor)) {
-                                                       $ok = OCIExecute($cursor);      
-                               return $cursor;
-                                               }
-                                               return $stmt;
-                    } else {
-                                               if (is_resource($stmt)) {
-                                                       OCIFreeStatement($stmt);
-                                                       return true;
-                                               }
-                        return $stmt;
-                    }
-                    break;
-                default :
-                                       // ociclose -- no because it could be used in a LOB?
-                    return true;
-            }
-               }
-               return false;
-       }
-       
-       // returns true or false
-       function _close()
-       {
-               if (!$this->_connectionID) return;
-               
-               if (!$this->autoCommit) OCIRollback($this->_connectionID);
-               if (count($this->_refLOBs) > 0) {
-                       foreach ($this ->_refLOBs as $key => $value) {
-                               $this->_refLOBs[$key]['LOB']->free();
-                               unset($this->_refLOBs[$key]);
-                       }
-               }
-               OCILogoff($this->_connectionID);
-               
-               $this->_stmt = false;
-               $this->_connectionID = false;
-       }
-       
-       function MetaPrimaryKeys($table, $owner=false,$internalKey=false)
-       {
-               if ($internalKey) return array('ROWID');
-               
-       // tested with oracle 8.1.7
-               $table = strtoupper($table);
-               if ($owner) {
-                       $owner_clause = "AND ((a.OWNER = b.OWNER) AND (a.OWNER = UPPER('$owner')))";
-                       $ptab = 'ALL_';
-               } else {
-                       $owner_clause = '';
-                       $ptab = 'USER_';
-               }
-               $sql = "
-SELECT /*+ RULE */ distinct b.column_name
-   FROM {$ptab}CONSTRAINTS a
-         , {$ptab}CONS_COLUMNS b
-  WHERE ( UPPER(b.table_name) = ('$table'))
-       AND (UPPER(a.table_name) = ('$table') and a.constraint_type = 'P')
-       $owner_clause
-       AND (a.constraint_name = b.constraint_name)";
-
-               $rs = $this->Execute($sql);
-               if ($rs && !$rs->EOF) {
-                       $arr = $rs->GetArray();
-                       $a = array();
-                       foreach($arr as $v) {
-                               $a[] = reset($v);
-                       }
-                       return $a;
-               }
-               else return false;
-       }
-       
-       // http://gis.mit.edu/classes/11.521/sqlnotes/referential_integrity.html
-       function MetaForeignKeys($table, $owner=false)
-       {
-       global $ADODB_FETCH_MODE;
-       
-               $save = $ADODB_FETCH_MODE;
-               $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
-               $table = $this->qstr(strtoupper($table));
-               if (!$owner) {
-                       $owner = $this->user;
-                       $tabp = 'user_';
-               } else
-                       $tabp = 'all_';
-                       
-               $owner = ' and owner='.$this->qstr(strtoupper($owner));
-               
-               $sql = 
-"select constraint_name,r_owner,r_constraint_name 
-       from {$tabp}constraints
-       where constraint_type = 'R' and table_name = $table $owner";
-               
-               $constraints = $this->GetArray($sql);
-               $arr = false;
-               foreach($constraints as $constr) {
-                       $cons = $this->qstr($constr[0]);
-                       $rowner = $this->qstr($constr[1]);
-                       $rcons = $this->qstr($constr[2]);
-                       $cols = $this->GetArray("select column_name from {$tabp}cons_columns where constraint_name=$cons $owner order by position");
-                       $tabcol = $this->GetArray("select table_name,column_name from {$tabp}cons_columns where owner=$rowner and constraint_name=$rcons order by position");
-                       
-                       if ($cols && $tabcol) 
-                               for ($i=0, $max=sizeof($cols); $i < $max; $i++) {
-                                       $arr[$tabcol[$i][0]] = $cols[$i][0].'='.$tabcol[$i][1];
-                               }
-               }
-               $ADODB_FETCH_MODE = $save;
-               
-               return $arr;
-       }
-
-       
-       function CharMax()
-       {
-               return 4000;
-       }
-       
-       function TextMax()
-       {
-               return 4000;
-       }
-       
-       /**
-        * Quotes a string.
-        * An example is  $db->qstr("Don't bother",magic_quotes_runtime());
-        * 
-        * @param s                     the string to quote
-        * @param [magic_quotes]        if $s is GET/POST var, set to get_magic_quotes_gpc().
-        *                              This undoes the stupidity of magic quotes for GPC.
-        *
-        * @return  quoted string to be sent back to database
-        */
-       function qstr($s,$magic_quotes=false)
-       {       
-               //$nofixquotes=false;
-       
-               if ($this->noNullStrings && strlen($s)==0)$s = ' ';
-               if (!$magic_quotes) {   
-                       if ($this->replaceQuote[0] == '\\'){
-                               $s = str_replace('\\','\\\\',$s);
-                       }
-                       return  "'".str_replace("'",$this->replaceQuote,$s)."'";
-               }
-               
-               // undo magic quotes for "
-               $s = str_replace('\\"','"',$s);
-               
-               $s = str_replace('\\\\','\\',$s);
-               return "'".str_replace("\\'",$this->replaceQuote,$s)."'";
-               
-       }
-       
-}
-
-/*--------------------------------------------------------------------------------------
-                Class Name: Recordset
---------------------------------------------------------------------------------------*/
-
-class ADORecordset_oci8 extends ADORecordSet {
-
-       var $databaseType = 'oci8';
-       var $bind=false;
-       var $_fieldobjs;
-       
-       //var $_arr = false;
-               
-       function ADORecordset_oci8($queryID,$mode=false)
-       {
-               if ($mode === false) { 
-                       global $ADODB_FETCH_MODE;
-                       $mode = $ADODB_FETCH_MODE;
-               }
-               switch ($mode)
-               {
-               case ADODB_FETCH_ASSOC:$this->fetchMode = OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break;
-               case ADODB_FETCH_DEFAULT:
-               case ADODB_FETCH_BOTH:$this->fetchMode = OCI_NUM+OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break;
-               case ADODB_FETCH_NUM: 
-               default:
-               $this->fetchMode = OCI_NUM+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break;
-               }
-               
-               $this->adodbFetchMode = $mode;
-               $this->_queryID = $queryID;
-       }
-
-
-       function Init()
-       {
-               if ($this->_inited) return;
-               
-               $this->_inited = true;
-               if ($this->_queryID) {
-                       
-                       $this->_currentRow = 0;
-                       @$this->_initrs();
-                       $this->EOF = !$this->_fetch();
-                       
-                       /*
-                       // based on idea by Gaetano Giunta to detect unusual oracle errors
-                       // see http://phplens.com/lens/lensforum/msgs.php?id=6771
-                       $err = OCIError($this->_queryID);
-                       if ($err && $this->connection->debug) ADOConnection::outp($err);
-                       */
-                       
-                       if (!is_array($this->fields)) {
-                               $this->_numOfRows = 0;
-                               $this->fields = array();
-                       }
-               } else {
-                       $this->fields = array();
-                       $this->_numOfRows = 0;
-                       $this->_numOfFields = 0;
-                       $this->EOF = true;
-               }
-       }
-       
-       function _initrs()
-       {
-               $this->_numOfRows = -1;
-               $this->_numOfFields = OCInumcols($this->_queryID);
-               if ($this->_numOfFields>0) {
-                       $this->_fieldobjs = array();
-                       $max = $this->_numOfFields;
-                       for ($i=0;$i<$max; $i++) $this->_fieldobjs[] = $this->_FetchField($i);
-               }
-       }
-
-         /*            Returns: an object containing field information.
-                         Get column information in the Recordset object. fetchField() can be used in order to obtain information about
-                         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)
-       {
-               $fld = new ADOFieldObject;
-               $fieldOffset += 1;
-               $fld->name =OCIcolumnname($this->_queryID, $fieldOffset);
-               $fld->type = OCIcolumntype($this->_queryID, $fieldOffset);
-               $fld->max_length = OCIcolumnsize($this->_queryID, $fieldOffset);
-               switch($fld->type) {
-               case 'NUMBER':
-                       $p = OCIColumnPrecision($this->_queryID, $fieldOffset);
-                       $sc = OCIColumnScale($this->_queryID, $fieldOffset);
-                       if ($p != 0 && $sc == 0) $fld->type = 'INT';
-                       break;
-               
-               case 'CLOB':
-               case 'NCLOB':
-               case 'BLOB': 
-                       $fld->max_length = -1;
-                       break;
-               }
-               return $fld;
-       }
-       
-       /* For some reason, OCIcolumnname fails when called after _initrs() so we cache it */
-       function FetchField($fieldOffset = -1)
-       {
-               return $this->_fieldobjs[$fieldOffset];
-       }
-       
-       
-       /*
-       // 10% speedup to move MoveNext to child class
-       function _MoveNext() 
-       {
-       //global $ADODB_EXTENSION;if ($ADODB_EXTENSION) return @adodb_movenext($this);
-               
-               if ($this->EOF) return false;
-               
-               $this->_currentRow++;
-               if(@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode))
-                       return true;
-               $this->EOF = true;
-               
-               return false;
-       }       */
-       
-       
-       function MoveNext()
-       {
-               if (@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) {
-                       $this->_currentRow += 1;
-                       return true;
-               }
-               if (!$this->EOF) {
-                       $this->_currentRow += 1;
-                       $this->EOF = true;
-               }
-               return false;
-       }
-       
-       /*
-       # does not work as first record is retrieved in _initrs(), so is not included in GetArray()
-       function GetArray($nRows = -1) 
-       {
-       global $ADODB_OCI8_GETARRAY;
-       
-               if (true ||  !empty($ADODB_OCI8_GETARRAY)) {
-                       # does not support $ADODB_ANSI_PADDING_OFF
-       
-                       //OCI_RETURN_NULLS and OCI_RETURN_LOBS is set by OCIfetchstatement
-                       switch($this->adodbFetchMode) {
-                       case ADODB_FETCH_NUM:
-                       
-                               $ncols = @OCIfetchstatement($this->_queryID, $results, 0, $nRows, OCI_FETCHSTATEMENT_BY_ROW+OCI_NUM);
-                               $results = array_merge(array($this->fields),$results);
-                               return $results;
-                               
-                       case ADODB_FETCH_ASSOC: 
-                               if (ADODB_ASSOC_CASE != 2 || $this->databaseType != 'oci8') break;
-                               
-                               $ncols = @OCIfetchstatement($this->_queryID, $assoc, 0, $nRows, OCI_FETCHSTATEMENT_BY_ROW);
-                               $results = array_merge(array($this->fields),$assoc);
-                               return $results;
-                       
-                       default:
-                               break;
-                       }
-               }
-                       
-               $results = ADORecordSet::GetArray($nRows);
-               return $results;
-               
-       } */
-       
-       /* Optimize SelectLimit() by using OCIFetch() instead of OCIFetchInto() */
-       function GetArrayLimit($nrows,$offset=-1) 
-       {
-               if ($offset <= 0) {
-                       $arr = $this->GetArray($nrows);
-                       return $arr;
-               }
-               $arr = array();
-               for ($i=1; $i < $offset; $i++) 
-                       if (!@OCIFetch($this->_queryID)) return $arr;
-                       
-               if (!@OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode)) return $arr;;
-               $results = array();
-               $cnt = 0;
-               while (!$this->EOF && $nrows != $cnt) {
-                       $results[$cnt++] = $this->fields;
-                       $this->MoveNext();
-               }
-               
-               return $results;
-       }
-
-       
-       /* Use associative array to get fields array */
-       function 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 false;
-       }
-
-       function _fetch() 
-       {
-               return @OCIfetchinto($this->_queryID,$this->fields,$this->fetchMode);
-       }
-
-       /*              close() only needs to be called if you are worried about using too much memory while your script
-                       is running. All associated result memory for the specified result identifier will automatically be freed.               */
-
-       function _close() 
-       {
-               if ($this->connection->_stmt === $this->_queryID) $this->connection->_stmt = false;
-               if (!empty($this->_refcursor)) {
-                       OCIFreeCursor($this->_refcursor);
-                       $this->_refcursor = false;
-               }
-               @OCIFreeStatement($this->_queryID);
-               $this->_queryID = false;
-               
-       }
-
-       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':
-               case 'NCHAR':
-               case 'NVARCHAR':
-               case 'NVARCHAR2':
-                                if (isset($this) && $len <= $this->blobSize) return 'C';
-               
-               case 'NCLOB':
-               case 'LONG':
-               case 'LONG VARCHAR':
-               case 'CLOB':
-               return 'X';
-               
-               case 'LONG RAW':
-               case 'LONG VARBINARY':
-               case 'BLOB':
-                       return 'B';
-               
-               case 'DATE': 
-                       return  ($this->connection->datetime) ? 'T' : 'D';
-               
-               
-               case 'TIMESTAMP': return 'T';
-               
-               case 'INT': 
-               case 'SMALLINT':
-               case 'INTEGER': 
-                       return 'I';
-                       
-               default: return 'N';
-               }
-       }
-}
-
-class ADORecordSet_ext_oci8 extends ADORecordSet_oci8 {        
-       function ADORecordSet_ext_oci8($queryID,$mode=false) 
-       {
-               if ($mode === false) { 
-                       global $ADODB_FETCH_MODE;
-                       $mode = $ADODB_FETCH_MODE;
-               }
-               switch ($mode)
-               {
-               case ADODB_FETCH_ASSOC:$this->fetchMode = OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break;
-               case ADODB_FETCH_DEFAULT:
-               case ADODB_FETCH_BOTH:$this->fetchMode = OCI_NUM+OCI_ASSOC+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break;
-               case ADODB_FETCH_NUM: 
-               default: $this->fetchMode = OCI_NUM+OCI_RETURN_NULLS+OCI_RETURN_LOBS; break;
-               }
-               $this->adodbFetchMode = $mode;
-               $this->_queryID = $queryID;
-       }
-       
-       function MoveNext()
-       {
-               return adodb_movenext($this);
-       }
-}
-?>
index 60a49a1..90be872 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim. All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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 c799c00..0cb133b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -370,7 +370,7 @@ See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/od
                }
        }
        
-       function MetaColumns($table)
+       function MetaColumns($table, $normalize=true)
        {
        global $ADODB_FETCH_MODE;
        
@@ -513,6 +513,11 @@ See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/od
                                        $this->_errorMsg = odbc_errormsg();
                                        $this->_errorCode = odbc_error();
                                }
+                               if($this->_errorCode == '00000') {      // MS SQL Server sometimes returns this in combination with the FreeTDS
+                                       $this->_errorMsg = '';          // driver and UnixODBC under Linux. This fixes the bogus "error"
+                                       $this->_errorCode = 0;          // <karsten@typo3.org>
+                                       return true;
+                               }
                                return false;
                        }
                
@@ -524,6 +529,11 @@ See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odbc/htm/od
                                        $this->_errorMsg = odbc_errormsg();
                                        $this->_errorCode = odbc_error();
                                }
+                               if($this->_errorCode == '00000') {      // MS SQL Server sometimes returns this in combination with the FreeTDS
+                                       $this->_errorMsg = '';          // driver and UnixODBC under Linux. This fixes the bogus "error"
+                                       $this->_errorCode = 0;          // <karsten@typo3.org>
+                                       return true;
+                               }
                                return false;
                        }
                } else
index ce85376..b12be03 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -134,10 +134,10 @@ class ADODB_ODBC_DB2 extends ADODB_odbc {
                return $this->GetOne($this->identitySQL);
        }
        
-       function RowLock($tables,$where,$flds='1 as ignore')
+       function RowLock($tables,$where,$col='1 as ignore')
        {
                if ($this->_autocommit) $this->BeginTrans();
-               return $this->GetOne("select $flds from $tables where $where for update");
+               return $this->GetOne("select $col from $tables where $where for update");
        }
        
        function MetaTables($ttype=false,$showSchema=false, $qtable="%", $qschema="%")
index 97f4cd0..c8e261b 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -130,14 +130,14 @@ order by constraint_name, referenced_table_name, keyno";
                return $ret;
        }
        
-       function MetaColumns($table)
+       function MetaColumns($table, $normalize=true)
        {
                $arr = ADOConnection::MetaColumns($table);
                return $arr;
        }
        
        
-       function MetaIndexes($table,$primary=false)
+       function MetaIndexes($table,$primary=false, $owner=false)
        {
                $table = $this->qstr($table);
 
index 3560826..9d2d527 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -50,7 +50,7 @@ class  ADODB_odbc_oracle extends ADODB_odbc {
                return $arr2;
        }
        
-       function MetaColumns($table) 
+       function MetaColumns($table, $normalize=true
        {
        global $ADODB_FETCH_MODE;
        
index e9c7d72..299bf70 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -541,7 +541,7 @@ class ADODB_odbtp extends ADOConnection{
                return @odbtp_execute( $stmt ) != false;
        }
 
-       function MetaIndexes($table,$primary=false)
+       function MetaIndexes($table,$primary=false, $owner=false)
        {
                switch ( $this->odbc_driver) {
                        case ODB_DRIVER_MSSQL:
index ad26c52..0e2e676 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-       V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+       V5.10 10 Nov 2009   (c) 2000-2009 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 6e926c6..b873ee0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -35,15 +35,19 @@ class ADODB_oracle extends ADOConnection {
        function DBDate($d)
        {
                if (is_string($d)) $d = ADORecordSet::UnixDate($d);
-               return 'TO_DATE('.adodb_date($this->fmtDate,$d).",'YYYY-MM-DD')";
+               if (is_object($d)) $ds = $d->format($this->fmtDate);
+               else $ds = adodb_date($this->fmtDate,$d);
+               return 'TO_DATE('.$ds.",'YYYY-MM-DD')";
        }
        
        // format and return date string in database timestamp format
        function DBTimeStamp($ts)
        {
 
-               if (is_string($ts)) $d = ADORecordSet::UnixTimeStamp($ts);
-               return 'TO_DATE('.adodb_date($this->fmtTimeStamp,$ts).",'RRRR-MM-DD, HH:MI:SS AM')";
+               if (is_string($ts)) $ts = ADORecordSet::UnixTimeStamp($ts);
+               if (is_object($ts)) $ds = $ts->format($this->fmtDate);
+               else $ds = adodb_date($this->fmtTimeStamp,$ts);
+               return 'TO_DATE('.$ds.",'RRRR-MM-DD, HH:MI:SS AM')";
        }
        
        
@@ -286,9 +290,9 @@ class ADORecordset_oracle extends ADORecordSet {
    function _fetch($ignore_fields=false) {
 // should remove call by reference, but ora_fetch_into requires it in 4.0.3pl1
                if ($this->fetchMode & ADODB_FETCH_ASSOC)
-                       return @ora_fetch_into($this->_queryID,&$this->fields,ORA_FETCHINTO_NULLS|ORA_FETCHINTO_ASSOC);
+                       return @ora_fetch_into($this->_queryID,$this->fields,ORA_FETCHINTO_NULLS|ORA_FETCHINTO_ASSOC);
                else 
-                       return @ora_fetch_into($this->_queryID,&$this->fields,ORA_FETCHINTO_NULLS);
+                       return @ora_fetch_into($this->_queryID,$this->fields,ORA_FETCHINTO_NULLS);
    }
 
    /*          close() only needs to be called if you are worried about using too much memory while your script
index cdbe617..d88456f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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 270b57c..a83ddfb 100644 (file)
@@ -2,7 +2,7 @@
 
 
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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 b6498e4..c650726 100644 (file)
@@ -2,7 +2,7 @@
 
 
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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 1f58ea8..b16fdef 100644 (file)
@@ -2,7 +2,7 @@
 
 
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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 f8443bc..a7e6462 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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 dcbb782..6218ff9 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 
 /* 
- V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -27,12 +27,13 @@ class ADODB_pdo_sqlite extends ADODB_pdo {
        var $_dropSeqSQL     = 'DROP TABLE %s';
        var $concat_operator = '||';
     var $pdoDriver       = false;
+       var $random='abs(random())';
     
        function _init($parentDriver)
        {
                $this->pdoDriver = $parentDriver;
                $parentDriver->_bindInputArray = true;
-               $parentDriver->hasTransactions = true;
+               $parentDriver->hasTransactions = false; // // should be set to false because of PDO SQLite driver not supporting changing autocommit mode
                $parentDriver->hasInsertID = true;
        }
 
@@ -40,7 +41,7 @@ class ADODB_pdo_sqlite extends ADODB_pdo {
        {
                $parent = $this->pdoDriver;
                @($ver = array_pop($parent->GetCol("SELECT sqlite_version()")));
-               @($end = array_pop($parent->GetCol("PRAGMA encoding")));
+               @($enc = array_pop($parent->GetCol("PRAGMA encoding")));
 
                $arr['version']     = $ver;
                $arr['description'] = 'SQLite ';
@@ -184,7 +185,19 @@ class ADODB_pdo_sqlite extends ADODB_pdo {
        function MetaTables($ttype=false,$showSchema=false,$mask=false)
        {
                $parent = $this->pdoDriver;
-               return $parent->GetCol($this->metaTablesSQL);
-       }
+               
+               if ($mask) {
+                       $save = $this->metaTablesSQL;
+                       $mask = $this->qstr(strtoupper($mask));
+                       $this->metaTablesSQL .= " AND name LIKE $mask";
+               }
+               
+               $ret = $parent->GetCol($this->metaTablesSQL);
+               
+               if ($mask) {
+                       $this->metaTablesSQL = $save;
+               }
+               return $ret;
+   }
 }
 ?>
\ No newline at end of file
index ffd885b..b4e69b6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
- V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.10 10 Nov 2009   (c) 2000-2009 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 07e3e6a..82fc328 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
- V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.10 10 Nov 2009   (c) 2000-2009 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 @@ WHERE relkind in ('r','v') AND (c.relname='%s' or c.relname = lower('%s'))
        var $random = 'random()';               /// random function
        var $autoRollback = true; // apparently pgsql does not autorollback properly before php 4.3.4
                                                        // http://bugs.php.net/bug.php?id=25404
-                                                       
+       
+       var $uniqueIisR = true;
        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.
        
@@ -177,10 +178,10 @@ a different OID if a database must be reloaded. */
                return @pg_Exec($this->_connectionID, "begin ".$this->_transmode);
        }
        
-       function RowLock($tables,$where,$flds='1 as ignore') 
+       function RowLock($tables,$where,$col='1 as ignore') 
        {
                if (!$this->transCnt) $this->BeginTrans();
-               return $this->GetOne("select $flds from $tables where $where for update");
+               return $this->GetOne("select $col from $tables where $where for update");
        }
 
        // returns true/false. 
@@ -459,7 +460,10 @@ select viewname,'V' from pg_views where viewname like $mask";
                        if (10 <= $len && $len <= 12) $date = 'date '.$date;
                        else $date = 'timestamp '.$date;
                }
-               return "($date+interval'$dayFraction days')";
+               
+               
+               return "($date+interval'".($dayFraction * 1440)." minutes')";
+               #return "($date+interval'$dayFraction days')";
        }
        
 
@@ -661,7 +665,7 @@ WHERE (c2.relname=\'%s\' or c2.relname=lower(\'%s\'))';
                        if (strlen($db) == 0) $db = 'template1';
                        $db = adodb_addslashes($db);
                        if ($str)  {
-                               $host = split(":", $str);
+                               $host = explode(":", $str);
                                if ($host[0]) $str = "host=".adodb_addslashes($host[0]);
                                else $str = '';
                                if (isset($host[1])) $str .= " port=$host[1]";
@@ -1052,7 +1056,7 @@ class ADORecordSet_postgres64 extends ADORecordSet{
                                case 'INT4':
                                case 'INT2':
                                        if (isset($fieldobj) &&
-                               empty($fieldobj->primary_key) && empty($fieldobj->unique)) return 'I';
+                               empty($fieldobj->primary_key) && (!$this->connection->uniqueIisR || empty($fieldobj->unique))) return 'I';
                                
                                case 'OID':
                                case 'SERIAL':
index 63fc9a1..57fb9a6 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
- V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.10 10 Nov 2009   (c) 2000-2009 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 f4bab5c..f4bbe36 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
- V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+ V5.10 10 Nov 2009   (c) 2000-2009 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 5e2effd..f985823 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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 5d29793..016d5fd 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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 ff45107..79836e0 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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.
@@ -78,14 +78,14 @@ class ADODB_sqlite extends ADOConnection {
        }
        
        // mark newnham
-       function MetaColumns($tab)
+       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('$tab')");
+         $rs = $this->Execute("PRAGMA table_info('$table')");
          if (isset($savem)) $this->SetFetchMode($savem);
          if (!$rs) {
            $ADODB_FETCH_MODE = $save; 
index a4daab7..79d809e 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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 eb417ba..46bf827 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim. All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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. 
@@ -86,11 +86,11 @@ class ADODB_sybase extends ADOConnection {
        }
        
        // http://www.isug.com/Sybase_FAQ/ASE/section6.1.html#6.1.4
-       function RowLock($tables,$where,$flds='top 1 null as ignore') 
+       function RowLock($tables,$where,$col='top 1 null as ignore') 
        {
                if (!$this->_hastrans) $this->BeginTrans();
                $tables = str_replace(',',' HOLDLOCK,',$tables);
-               return $this->GetOne("select $flds from $tables HOLDLOCK where $where");
+               return $this->GetOne("select $col from $tables HOLDLOCK where $where");
                
        }       
                
index ca6db05..13f7bdd 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /*
-  V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+  V5.10 10 Nov 2009   (c) 2000-2009 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 97636c9..490a6cb 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* 
-V5.08 6 Apr 2009   (c) 2000-2009 John Lim (jlim#natsoft.com). All rights reserved.
+V5.10 10 Nov 2009   (c) 2000-2009 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/typo3/sysext/adodb/doc/508a.DBAL.patch b/typo3/sysext/adodb/doc/508a.DBAL.patch
deleted file mode 100644 (file)
index fb4791b..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-diff -urN adodb508a/adodb-lib.inc.php adodb/adodb-lib.inc.php
---- adodb508a/adodb-lib.inc.php        2009-05-16 00:45:10.000000000 +0200
-+++ adodb/adodb-lib.inc.php    2009-05-16 00:45:17.000000000 +0200
-@@ -886,7 +886,7 @@
-       $values = substr($values, 0, -2);
-       // Append the fields and their values to the insert query.
--      return 'INSERT INTO '.$tableName.' ( '.$fields.' ) VALUES ( '.$values.' )';
-+      return 'INSERT INTO '.$zthis->nameQuote.$tableName.$zthis->nameQuote.' ( '.$fields.' ) VALUES ( '.$values.' )';
- }
-diff -urN adodb508a/datadict/datadict-oci8.inc.php adodb/datadict/datadict-oci8.inc.php
---- adodb508a/datadict/datadict-oci8.inc.php   2009-05-16 00:45:10.000000000 +0200
-+++ adodb/datadict/datadict-oci8.inc.php       2009-05-16 00:45:17.000000000 +0200
-@@ -110,6 +110,7 @@
-       
-       function AddColumnSQL($tabname, $flds)
-       {
-+              $tabname = $this->TableName ($tabname);
-               $f = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               $s = "ALTER TABLE $tabname ADD (";
-@@ -124,6 +125,7 @@
-       
-       function AlterColumnSQL($tabname, $flds)
-       {
-+              $tabname = $this->TableName ($tabname);
-               $f = array();
-               list($lines,$pkey) = $this->_GenFields($flds);
-               $s = "ALTER TABLE $tabname MODIFY(";
-@@ -137,6 +139,7 @@
-       
-       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);
-               
-@@ -260,9 +263,9 @@
-               }
-               
-               if ( is_array($flds) )
--                      $flds = implode(', ',$flds);
--              $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')';
--              
-+                      $flds = implode('", "',$flds);
-+              $s = 'CREATE' . $unique . ' INDEX "' . $idxname . '" ON "' .$tabname . '" ("' . $flds . '")';
-+
-               if ( isset($idxoptions[$this->upperName]) )
-                       $s .= $idxoptions[$this->upperName];
-               
-diff -urN adodb508a/datadict/datadict-postgres.inc.php adodb/datadict/datadict-postgres.inc.php
---- adodb508a/datadict/datadict-postgres.inc.php       2009-05-16 00:45:10.000000000 +0200
-+++ adodb/datadict/datadict-postgres.inc.php   2009-05-16 00:45:17.000000000 +0200
-@@ -418,7 +418,7 @@
-               
-               $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : '';
-               
--              $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' ';
-+              $s = 'CREATE' . $unique . ' INDEX "' . $idxname . '" ON "' . $tabname . '" ';
-               
-               if (isset($idxoptions['HASH']))
-                       $s .= 'USING HASH ';
-@@ -427,8 +427,8 @@
-                       $s .= $idxoptions[$this->upperName];
-               
-               if ( is_array($flds) )
--                      $flds = implode(', ',$flds);
--              $s .= '(' . $flds . ')';
-+                      $flds = implode('", "',$flds);
-+              $s .= '("' . $flds . '")';
-               $sql[] = $s;
-               
-               return $sql;
-diff -urN adodb508a/drivers/adodb-oci8.inc.php adodb/drivers/adodb-oci8.inc.php
---- adodb508a/drivers/adodb-oci8.inc.php       2009-05-16 00:45:11.000000000 +0200
-+++ adodb/drivers/adodb-oci8.inc.php   2009-05-16 00:45:17.000000000 +0200
-@@ -106,7 +106,7 @@
-               $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
-               if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
-               
--              $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table)));
-+              $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table));
-               
-               if (isset($savem)) $this->SetFetchMode($savem);
-               $ADODB_FETCH_MODE = $save;
diff --git a/typo3/sysext/adodb/doc/510.DBAL.patch b/typo3/sysext/adodb/doc/510.DBAL.patch
new file mode 100644 (file)
index 0000000..5a3bb24
--- /dev/null
@@ -0,0 +1,87 @@
+diff -urN adodb508a/adodb-lib.inc.php adodb/adodb-lib.inc.php
+--- adodb510/adodb-lib.inc.php 2009-05-16 00:45:10.000000000 +0200
++++ adodb/adodb-lib.inc.php    2009-05-16 00:45:17.000000000 +0200
+@@ -886,7 +886,7 @@
+       $values = substr($values, 0, -2);
+       // Append the fields and their values to the insert query.
+-      return 'INSERT INTO '.$tableName.' ( '.$fields.' ) VALUES ( '.$values.' )';
++      return 'INSERT INTO '.$zthis->nameQuote.$tableName.$zthis->nameQuote.' ( '.$fields.' ) VALUES ( '.$values.' )';
+ }
+diff -urN adodb510/datadict/datadict-oci8.inc.php adodb/datadict/datadict-oci8.inc.php
+--- adodb510/datadict/datadict-oci8.inc.php    2009-05-16 00:45:10.000000000 +0200
++++ adodb/datadict/datadict-oci8.inc.php       2009-05-16 00:45:17.000000000 +0200
+@@ -110,6 +110,7 @@
+       
+       function AddColumnSQL($tabname, $flds)
+       {
++              $tabname = $this->TableName ($tabname);
+               $f = array();
+               list($lines,$pkey) = $this->_GenFields($flds);
+               $s = "ALTER TABLE $tabname ADD (";
+@@ -124,6 +125,7 @@
+       
+       function AlterColumnSQL($tabname, $flds)
+       {
++              $tabname = $this->TableName ($tabname);
+               $f = array();
+               list($lines,$pkey) = $this->_GenFields($flds);
+               $s = "ALTER TABLE $tabname MODIFY(";
+@@ -137,6 +139,7 @@
+       
+       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);
+               
+@@ -260,9 +263,9 @@
+               }
+               
+               if ( is_array($flds) )
+-                      $flds = implode(', ',$flds);
+-              $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' (' . $flds . ')';
+-              
++                      $flds = implode('", "',$flds);
++              $s = 'CREATE' . $unique . ' INDEX "' . $idxname . '" ON "' .$tabname . '" ("' . $flds . '")';
++
+               if ( isset($idxoptions[$this->upperName]) )
+                       $s .= $idxoptions[$this->upperName];
+               
+diff -urN adodb510/datadict/datadict-postgres.inc.php adodb/datadict/datadict-postgres.inc.php
+--- adodb510/datadict/datadict-postgres.inc.php        2009-05-16 00:45:10.000000000 +0200
++++ adodb/datadict/datadict-postgres.inc.php   2009-05-16 00:45:17.000000000 +0200
+@@ -418,7 +418,7 @@
+               
+               $unique = isset($idxoptions['UNIQUE']) ? ' UNIQUE' : '';
+               
+-              $s = 'CREATE' . $unique . ' INDEX ' . $idxname . ' ON ' . $tabname . ' ';
++              $s = 'CREATE' . $unique . ' INDEX "' . $idxname . '" ON "' . $tabname . '" ';
+               
+               if (isset($idxoptions['HASH']))
+                       $s .= 'USING HASH ';
+@@ -427,8 +427,8 @@
+                       $s .= $idxoptions[$this->upperName];
+               
+               if ( is_array($flds) )
+-                      $flds = implode(', ',$flds);
+-              $s .= '(' . $flds . ')';
++                      $flds = implode('", "',$flds);
++              $s .= '("' . $flds . '")';
+               $sql[] = $s;
+               
+               return $sql;
+diff -urN adodb510/drivers/adodb-oci8.inc.php adodb/drivers/adodb-oci8.inc.php
+--- adodb510/drivers/adodb-oci8.inc.php        2009-05-16 00:45:11.000000000 +0200
++++ adodb/drivers/adodb-oci8.inc.php   2009-05-16 00:45:17.000000000 +0200
+@@ -106,7 +106,7 @@
+               $ADODB_FETCH_MODE = ADODB_FETCH_NUM;
+               if ($this->fetchMode !== false) $savem = $this->SetFetchMode(false);
+               
+-              $rs = $this->Execute(sprintf($this->metaColumnsSQL,strtoupper($table)));
++              $rs = $this->Execute(sprintf($this->metaColumnsSQL,$table));
+               
+               if (isset($savem)) $this->SetFetchMode($savem);
+               $ADODB_FETCH_MODE = $save;
index 00dd595..3d4bd88 100644 (file)
@@ -1,5 +1,5 @@
-diff -urw adodb.481/drivers/adodb-odbc.inc.php adodb/drivers/adodb-odbc.inc.php
---- adodb.481/drivers/adodb-odbc.inc.php       2006-05-03 09:42:44.000000000 +0200
+diff -urw adodb5/drivers/adodb-odbc.inc.php adodb/drivers/adodb-odbc.inc.php
+--- adodb5/drivers/adodb-odbc.inc.php  2006-05-03 09:42:44.000000000 +0200
 +++ adodb/drivers/adodb-odbc.inc.php   2006-05-15 13:52:08.000000000 +0200
 @@ -513,6 +513,11 @@
                                        $this->_errorMsg = odbc_errormsg();
index f3c9813..6ff6e6f 100644 (file)
@@ -3,7 +3,7 @@
 ########################################################################
 # Extension Manager/Repository config file for ext "adodb".
 #
-# Auto generated 21-10-2009 11:05
+# Auto generated 25-11-2009 15:56
 #
 # Manual updates:
 # Only the data in the array - everything else is removed by next
@@ -27,13 +27,13 @@ $EM_CONF[$_EXTKEY] = array(
        'modify_tables' => '',
        'clearCacheOnLoad' => 0,
        'lockType' => '',
-       'author' => 'Karsten Dambekalns',
-       'author_email' => 'karsten@typo3.org',
-       'author_company' => 'TYPO3 Association',
+       'author' => 'Xavier Perseguers',
+       'author_email' => 'typo3@perseguers.ch',
+       'author_company' => '',
        'CGLcompliance' => '',
        'CGLcompliance_note' => '',
-       'version' => '5.8.1',
-       '_md5_values_when_last_written' => 'a:123:{s:25:"checkconnectionwizard.php";s:4:"5d13";s:27:"class.tx_adodb_tceforms.php";s:4:"7039";s:26:"datasource_flexform_ds.xml";s:4:"96fb";s:12:"ext_icon.gif";s:4:"c778";s:17:"ext_localconf.php";s:4:"62dd";s:31:"locallang_datasource_config.xml";s:4:"df55";s:20:"locallang_wizard.xml";s:4:"dca8";s:33:"adodb/adodb-active-record.inc.php";s:4:"75d6";s:34:"adodb/adodb-active-recordx.inc.php";s:4:"f472";s:26:"adodb/adodb-csvlib.inc.php";s:4:"3401";s:28:"adodb/adodb-datadict.inc.php";s:4:"5e39";s:25:"adodb/adodb-error.inc.php";s:4:"2106";s:32:"adodb/adodb-errorhandler.inc.php";s:4:"8591";s:29:"adodb/adodb-errorpear.inc.php";s:4:"e6d9";s:30:"adodb/adodb-exceptions.inc.php";s:4:"6d4f";s:28:"adodb/adodb-iterator.inc.php";s:4:"f7f4";s:23:"adodb/adodb-lib.inc.php";s:4:"f968";s:32:"adodb/adodb-memcache.lib.inc.php";s:4:"3f2e";s:25:"adodb/adodb-pager.inc.php";s:4:"f7d8";s:24:"adodb/adodb-pear.inc.php";s:4:"f8a9";s:24:"adodb/adodb-time.inc.php";s:4:"9889";s:19:"adodb/adodb.inc.php";s:4:"17b9";s:17:"adodb/license.txt";s:4:"af93";s:16:"adodb/readme.txt";s:4:"a2d2";s:30:"adodb/contrib/toxmlrpc.inc.php";s:4:"aa3f";s:38:"adodb/datadict/datadict-access.inc.php";s:4:"4e20";s:35:"adodb/datadict/datadict-db2.inc.php";s:4:"339b";s:40:"adodb/datadict/datadict-firebird.inc.php";s:4:"ec53";s:39:"adodb/datadict/datadict-generic.inc.php";s:4:"d098";s:37:"adodb/datadict/datadict-ibase.inc.php";s:4:"f04c";s:40:"adodb/datadict/datadict-informix.inc.php";s:4:"2923";s:37:"adodb/datadict/datadict-mssql.inc.php";s:4:"fc03";s:43:"adodb/datadict/datadict-mssqlnative.inc.php";s:4:"6228";s:37:"adodb/datadict/datadict-mysql.inc.php";s:4:"908f";s:36:"adodb/datadict/datadict-oci8.inc.php";s:4:"ddec";s:40:"adodb/datadict/datadict-postgres.inc.php";s:4:"31ee";s:37:"adodb/datadict/datadict-sapdb.inc.php";s:4:"e864";s:38:"adodb/datadict/datadict-sybase.inc.php";s:4:"6ba2";s:34:"adodb/drivers/adodb-access.inc.php";s:4:"c2d1";s:31:"adodb/drivers/adodb-ado.inc.php";s:4:"c57e";s:32:"adodb/drivers/adodb-ado5.inc.php";s:4:"81a0";s:38:"adodb/drivers/adodb-ado_access.inc.php";s:4:"ce97";s:37:"adodb/drivers/adodb-ado_mssql.inc.php";s:4:"74d4";s:41:"adodb/drivers/adodb-borland_ibase.inc.php";s:4:"921b";s:31:"adodb/drivers/adodb-csv.inc.php";s:4:"6d85";s:31:"adodb/drivers/adodb-db2.inc.php";s:4:"8a8b";s:33:"adodb/drivers/adodb-fbsql.inc.php";s:4:"0bb6";s:36:"adodb/drivers/adodb-firebird.inc.php";s:4:"0e66";s:33:"adodb/drivers/adodb-ibase.inc.php";s:4:"73f9";s:36:"adodb/drivers/adodb-informix.inc.php";s:4:"e4cf";s:38:"adodb/drivers/adodb-informix72.inc.php";s:4:"44d0";s:32:"adodb/drivers/adodb-ldap.inc.php";s:4:"3c87";s:33:"adodb/drivers/adodb-mssql.inc.php";s:4:"6996";s:35:"adodb/drivers/adodb-mssql_n.inc.php";s:4:"4a68";s:39:"adodb/drivers/adodb-mssqlnative.inc.php";s:4:"0ff5";s:35:"adodb/drivers/adodb-mssqlpo.inc.php";s:4:"da12";s:33:"adodb/drivers/adodb-mysql.inc.php";s:4:"7780";s:34:"adodb/drivers/adodb-mysqli.inc.php";s:4:"c41f";s:35:"adodb/drivers/adodb-mysqlpo.inc.php";s:4:"d4be";s:34:"adodb/drivers/adodb-mysqlt.inc.php";s:4:"7246";s:35:"adodb/drivers/adodb-netezza.inc.php";s:4:"604b";s:32:"adodb/drivers/adodb-oci8.inc.php";s:4:"103f";s:36:"adodb/drivers/adodb-oci8.old.inc.php";s:4:"6f30";s:34:"adodb/drivers/adodb-oci805.inc.php";s:4:"2d0a";s:34:"adodb/drivers/adodb-oci8po.inc.php";s:4:"3a8a";s:32:"adodb/drivers/adodb-odbc.inc.php";s:4:"d076";s:36:"adodb/drivers/adodb-odbc_db2.inc.php";s:4:"4b07";s:38:"adodb/drivers/adodb-odbc_mssql.inc.php";s:4:"01be";s:39:"adodb/drivers/adodb-odbc_oracle.inc.php";s:4:"717f";s:33:"adodb/drivers/adodb-odbtp.inc.php";s:4:"d40e";s:41:"adodb/drivers/adodb-odbtp_unicode.inc.php";s:4:"48ef";s:34:"adodb/drivers/adodb-oracle.inc.php";s:4:"8e5c";s:31:"adodb/drivers/adodb-pdo.inc.php";s:4:"b4a4";s:37:"adodb/drivers/adodb-pdo_mssql.inc.php";s:4:"a121";s:37:"adodb/drivers/adodb-pdo_mysql.inc.php";s:4:"7dd7";s:35:"adodb/drivers/adodb-pdo_oci.inc.php";s:4:"2298";s:37:"adodb/drivers/adodb-pdo_pgsql.inc.php";s:4:"8f66";s:38:"adodb/drivers/adodb-pdo_sqlite.inc.php";s:4:"78c8";s:36:"adodb/drivers/adodb-postgres.inc.php";s:4:"fbfd";s:38:"adodb/drivers/adodb-postgres64.inc.php";s:4:"5ee2";s:37:"adodb/drivers/adodb-postgres7.inc.php";s:4:"8e7e";s:37:"adodb/drivers/adodb-postgres8.inc.php";s:4:"92a9";s:33:"adodb/drivers/adodb-proxy.inc.php";s:4:"e35d";s:33:"adodb/drivers/adodb-sapdb.inc.php";s:4:"2fe9";s:39:"adodb/drivers/adodb-sqlanywhere.inc.php";s:4:"cb31";s:34:"adodb/drivers/adodb-sqlite.inc.php";s:4:"a30b";s:36:"adodb/drivers/adodb-sqlitepo.inc.php";s:4:"7217";s:34:"adodb/drivers/adodb-sybase.inc.php";s:4:"6b03";s:38:"adodb/drivers/adodb-sybase_ase.inc.php";s:4:"71b6";s:31:"adodb/drivers/adodb-vfp.inc.php";s:4:"57ea";s:27:"adodb/lang/adodb-ar.inc.php";s:4:"5660";s:27:"adodb/lang/adodb-bg.inc.php";s:4:"37b0";s:31:"adodb/lang/adodb-bgutf8.inc.php";s:4:"ed08";s:27:"adodb/lang/adodb-ca.inc.php";s:4:"b903";s:27:"adodb/lang/adodb-cn.inc.php";s:4:"c8e1";s:27:"adodb/lang/adodb-cz.inc.php";s:4:"0339";s:27:"adodb/lang/adodb-da.inc.php";s:4:"2ea2";s:27:"adodb/lang/adodb-de.inc.php";s:4:"6e6e";s:27:"adodb/lang/adodb-en.inc.php";s:4:"c542";s:27:"adodb/lang/adodb-es.inc.php";s:4:"de07";s:34:"adodb/lang/adodb-esperanto.inc.php";s:4:"32b9";s:27:"adodb/lang/adodb-fa.inc.php";s:4:"32dd";s:27:"adodb/lang/adodb-fr.inc.php";s:4:"237c";s:27:"adodb/lang/adodb-hu.inc.php";s:4:"f308";s:27:"adodb/lang/adodb-it.inc.php";s:4:"ae50";s:27:"adodb/lang/adodb-nl.inc.php";s:4:"ed3d";s:27:"adodb/lang/adodb-pl.inc.php";s:4:"8a53";s:30:"adodb/lang/adodb-pt-br.inc.php";s:4:"14cc";s:27:"adodb/lang/adodb-ro.inc.php";s:4:"7105";s:31:"adodb/lang/adodb-ru1251.inc.php";s:4:"43c8";s:27:"adodb/lang/adodb-sv.inc.php";s:4:"2e5a";s:31:"adodb/lang/adodb-uk1251.inc.php";s:4:"822a";s:27:"adodb/lang/adodb_th.inc.php";s:4:"201d";s:29:"adodb/xsl/convert-0.1-0.2.xsl";s:4:"29d9";s:29:"adodb/xsl/convert-0.1-0.3.xsl";s:4:"6aad";s:29:"adodb/xsl/convert-0.2-0.1.xsl";s:4:"5d27";s:29:"adodb/xsl/convert-0.2-0.3.xsl";s:4:"4098";s:24:"adodb/xsl/remove-0.2.xsl";s:4:"0b2b";s:24:"adodb/xsl/remove-0.3.xsl";s:4:"678d";s:19:"doc/508a.DBAL.patch";s:4:"ff45";s:10:"doc/README";s:4:"d375";s:25:"doc/mssql-error-fix.patch";s:4:"8757";s:23:"res/checkconnection.gif";s:4:"1760";}',
+       'version' => '5.10.0',
+       '_md5_values_when_last_written' => 'a:124:{s:25:"checkconnectionwizard.php";s:4:"5d13";s:27:"class.tx_adodb_tceforms.php";s:4:"7039";s:26:"datasource_flexform_ds.xml";s:4:"96fb";s:12:"ext_icon.gif";s:4:"c778";s:17:"ext_localconf.php";s:4:"62dd";s:31:"locallang_datasource_config.xml";s:4:"df55";s:20:"locallang_wizard.xml";s:4:"dca8";s:33:"adodb/adodb-active-record.inc.php";s:4:"6a59";s:34:"adodb/adodb-active-recordx.inc.php";s:4:"f472";s:26:"adodb/adodb-csvlib.inc.php";s:4:"ce7e";s:28:"adodb/adodb-datadict.inc.php";s:4:"764f";s:25:"adodb/adodb-error.inc.php";s:4:"2106";s:32:"adodb/adodb-errorhandler.inc.php";s:4:"1755";s:29:"adodb/adodb-errorpear.inc.php";s:4:"e6d9";s:30:"adodb/adodb-exceptions.inc.php";s:4:"ea57";s:28:"adodb/adodb-iterator.inc.php";s:4:"813b";s:23:"adodb/adodb-lib.inc.php";s:4:"f968";s:32:"adodb/adodb-memcache.lib.inc.php";s:4:"a3dc";s:25:"adodb/adodb-pager.inc.php";s:4:"ed46";s:24:"adodb/adodb-pear.inc.php";s:4:"f8a9";s:24:"adodb/adodb-time.inc.php";s:4:"5476";s:19:"adodb/adodb.inc.php";s:4:"7cc3";s:17:"adodb/license.txt";s:4:"af93";s:16:"adodb/readme.txt";s:4:"a2d2";s:30:"adodb/contrib/toxmlrpc.inc.php";s:4:"aa3f";s:38:"adodb/datadict/datadict-access.inc.php";s:4:"3ce0";s:35:"adodb/datadict/datadict-db2.inc.php";s:4:"da98";s:40:"adodb/datadict/datadict-firebird.inc.php";s:4:"0d09";s:39:"adodb/datadict/datadict-generic.inc.php";s:4:"598e";s:37:"adodb/datadict/datadict-ibase.inc.php";s:4:"e9bf";s:40:"adodb/datadict/datadict-informix.inc.php";s:4:"8ca9";s:37:"adodb/datadict/datadict-mssql.inc.php";s:4:"a75e";s:43:"adodb/datadict/datadict-mssqlnative.inc.php";s:4:"8ae8";s:37:"adodb/datadict/datadict-mysql.inc.php";s:4:"b443";s:36:"adodb/datadict/datadict-oci8.inc.php";s:4:"7501";s:40:"adodb/datadict/datadict-postgres.inc.php";s:4:"bfa3";s:37:"adodb/datadict/datadict-sapdb.inc.php";s:4:"e624";s:38:"adodb/datadict/datadict-sybase.inc.php";s:4:"fa38";s:34:"adodb/drivers/adodb-access.inc.php";s:4:"e4b4";s:31:"adodb/drivers/adodb-ado.inc.php";s:4:"2cbd";s:32:"adodb/drivers/adodb-ado5.inc.php";s:4:"8b01";s:38:"adodb/drivers/adodb-ado_access.inc.php";s:4:"51d3";s:37:"adodb/drivers/adodb-ado_mssql.inc.php";s:4:"220d";s:31:"adodb/drivers/adodb-ads.inc.php";s:4:"c7c7";s:41:"adodb/drivers/adodb-borland_ibase.inc.php";s:4:"4800";s:31:"adodb/drivers/adodb-csv.inc.php";s:4:"68b0";s:31:"adodb/drivers/adodb-db2.inc.php";s:4:"c7be";s:34:"adodb/drivers/adodb-db2oci.inc.php";s:4:"f215";s:33:"adodb/drivers/adodb-fbsql.inc.php";s:4:"d2e7";s:36:"adodb/drivers/adodb-firebird.inc.php";s:4:"9c66";s:33:"adodb/drivers/adodb-ibase.inc.php";s:4:"d667";s:36:"adodb/drivers/adodb-informix.inc.php";s:4:"e4cf";s:38:"adodb/drivers/adodb-informix72.inc.php";s:4:"1917";s:32:"adodb/drivers/adodb-ldap.inc.php";s:4:"2419";s:33:"adodb/drivers/adodb-mssql.inc.php";s:4:"102b";s:35:"adodb/drivers/adodb-mssql_n.inc.php";s:4:"4a68";s:39:"adodb/drivers/adodb-mssqlnative.inc.php";s:4:"4c20";s:35:"adodb/drivers/adodb-mssqlpo.inc.php";s:4:"da12";s:33:"adodb/drivers/adodb-mysql.inc.php";s:4:"36ed";s:34:"adodb/drivers/adodb-mysqli.inc.php";s:4:"1f45";s:35:"adodb/drivers/adodb-mysqlpo.inc.php";s:4:"ed80";s:34:"adodb/drivers/adodb-mysqlt.inc.php";s:4:"ba75";s:35:"adodb/drivers/adodb-netezza.inc.php";s:4:"e2dc";s:32:"adodb/drivers/adodb-oci8.inc.php";s:4:"7378";s:34:"adodb/drivers/adodb-oci805.inc.php";s:4:"2d0a";s:34:"adodb/drivers/adodb-oci8po.inc.php";s:4:"9584";s:32:"adodb/drivers/adodb-odbc.inc.php";s:4:"cd88";s:36:"adodb/drivers/adodb-odbc_db2.inc.php";s:4:"87e3";s:38:"adodb/drivers/adodb-odbc_mssql.inc.php";s:4:"d9f0";s:39:"adodb/drivers/adodb-odbc_oracle.inc.php";s:4:"6c9e";s:33:"adodb/drivers/adodb-odbtp.inc.php";s:4:"918f";s:41:"adodb/drivers/adodb-odbtp_unicode.inc.php";s:4:"6295";s:34:"adodb/drivers/adodb-oracle.inc.php";s:4:"07d2";s:31:"adodb/drivers/adodb-pdo.inc.php";s:4:"f5ad";s:37:"adodb/drivers/adodb-pdo_mssql.inc.php";s:4:"3268";s:37:"adodb/drivers/adodb-pdo_mysql.inc.php";s:4:"c715";s:35:"adodb/drivers/adodb-pdo_oci.inc.php";s:4:"ef31";s:37:"adodb/drivers/adodb-pdo_pgsql.inc.php";s:4:"7e1e";s:38:"adodb/drivers/adodb-pdo_sqlite.inc.php";s:4:"2782";s:36:"adodb/drivers/adodb-postgres.inc.php";s:4:"90f9";s:38:"adodb/drivers/adodb-postgres64.inc.php";s:4:"e6ff";s:37:"adodb/drivers/adodb-postgres7.inc.php";s:4:"12e3";s:37:"adodb/drivers/adodb-postgres8.inc.php";s:4:"b516";s:33:"adodb/drivers/adodb-proxy.inc.php";s:4:"4e25";s:33:"adodb/drivers/adodb-sapdb.inc.php";s:4:"04f1";s:39:"adodb/drivers/adodb-sqlanywhere.inc.php";s:4:"cb31";s:34:"adodb/drivers/adodb-sqlite.inc.php";s:4:"abba";s:36:"adodb/drivers/adodb-sqlitepo.inc.php";s:4:"d5ee";s:34:"adodb/drivers/adodb-sybase.inc.php";s:4:"1dc6";s:38:"adodb/drivers/adodb-sybase_ase.inc.php";s:4:"5dae";s:31:"adodb/drivers/adodb-vfp.inc.php";s:4:"3c4d";s:27:"adodb/lang/adodb-ar.inc.php";s:4:"5660";s:27:"adodb/lang/adodb-bg.inc.php";s:4:"37b0";s:31:"adodb/lang/adodb-bgutf8.inc.php";s:4:"ed08";s:27:"adodb/lang/adodb-ca.inc.php";s:4:"b903";s:27:"adodb/lang/adodb-cn.inc.php";s:4:"c8e1";s:27:"adodb/lang/adodb-cz.inc.php";s:4:"0339";s:27:"adodb/lang/adodb-da.inc.php";s:4:"2ea2";s:27:"adodb/lang/adodb-de.inc.php";s:4:"6e6e";s:27:"adodb/lang/adodb-en.inc.php";s:4:"c542";s:27:"adodb/lang/adodb-es.inc.php";s:4:"de07";s:34:"adodb/lang/adodb-esperanto.inc.php";s:4:"32b9";s:27:"adodb/lang/adodb-fa.inc.php";s:4:"aa96";s:27:"adodb/lang/adodb-fr.inc.php";s:4:"237c";s:27:"adodb/lang/adodb-hu.inc.php";s:4:"f308";s:27:"adodb/lang/adodb-it.inc.php";s:4:"ae50";s:27:"adodb/lang/adodb-nl.inc.php";s:4:"ed3d";s:27:"adodb/lang/adodb-pl.inc.php";s:4:"8a53";s:30:"adodb/lang/adodb-pt-br.inc.php";s:4:"14cc";s:27:"adodb/lang/adodb-ro.inc.php";s:4:"7105";s:31:"adodb/lang/adodb-ru1251.inc.php";s:4:"43c8";s:27:"adodb/lang/adodb-sv.inc.php";s:4:"2e5a";s:31:"adodb/lang/adodb-uk1251.inc.php";s:4:"822a";s:27:"adodb/lang/adodb_th.inc.php";s:4:"201d";s:29:"adodb/xsl/convert-0.1-0.2.xsl";s:4:"29d9";s:29:"adodb/xsl/convert-0.1-0.3.xsl";s:4:"6aad";s:29:"adodb/xsl/convert-0.2-0.1.xsl";s:4:"5d27";s:29:"adodb/xsl/convert-0.2-0.3.xsl";s:4:"4098";s:24:"adodb/xsl/remove-0.2.xsl";s:4:"0b2b";s:24:"adodb/xsl/remove-0.3.xsl";s:4:"678d";s:18:"doc/510.DBAL.patch";s:4:"e88d";s:10:"doc/README";s:4:"d375";s:25:"doc/mssql-error-fix.patch";s:4:"91bf";s:23:"res/checkconnection.gif";s:4:"1760";}',
        'constraints' => array(
                'depends' => array(
                        'php' => '5.1.0-0.0.0',