MDL-24551 importing latest adodb 5.11

This commit is contained in:
Petr Skoda 2010-10-06 15:31:49 +00:00
parent a02357dfbf
commit 6ede09aa83
120 changed files with 499 additions and 950 deletions

View file

@ -1,6 +1,6 @@
<?php
/*
V5.06 16 Oct 2008 (c) 2006 John Lim (jlim#natsoft.com). All rights reserved.
V5.11 5 May 2010 (c) 2000-2010 (jlim#natsoft.com). All rights reserved.
This is a version of the ADODB driver for DB2. It uses the 'ibm_db2' PECL extension
for PHP (http://pecl.php.net/package/ibm_db2), which in turn requires DB2 V8.2.2 or
@ -210,31 +210,19 @@ class ADODB_db2 extends ADOConnection {
function ServerInfo()
{
if (!empty($this->host) && ADODB_PHPVER >= 0x4300) {
$dsn = strtoupper($this->host);
$first = true;
$found = false;
if (!function_exists('db2_data_source')) return false;
while(true) {
$rez = @db2_data_source($this->_connectionID,
$first ? SQL_FETCH_FIRST : SQL_FETCH_NEXT);
$first = false;
if (!is_array($rez)) break;
if (strtoupper($rez['server']) == $dsn) {
$found = true;
break;
}
}
if (!$found) return ADOConnection::ServerInfo();
if (!isset($rez['version'])) $rez['version'] = '';
return $rez;
$row = $this->GetRow("SELECT service_level, fixpack_num FROM TABLE(sysproc.env_get_inst_info())
as INSTANCEINFO");
if ($row) {
$info['version'] = $row[0].':'.$row[1];
$info['fixpack'] = $row[1];
$info['description'] = '';
} else {
return ADOConnection::ServerInfo();
}
return $info;
}
function CreateSequence($seqname='adodbseq',$start=1)