Bug #21687 » 0012755.patch
typo3/sysext/adodb/doc/510.DBAL.patch (Arbeitskopie) | ||
---|---|---|
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
|
||
--- 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);
|
||
... | ... | |
}
|
||
|
||
|
||
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
|
||
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 @@
|
||
|
||
... | ... | |
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
|
||
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 @@
|
||
|
||
... | ... | |
$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
|
||
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;
|
typo3/sysext/adodb/doc/mssql-error-fix.patch (Arbeitskopie) | ||
---|---|---|
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();
|
typo3/sysext/adodb/doc/508a.DBAL.patch (Arbeitskopie) | ||
---|---|---|
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;
|
typo3/sysext/adodb/adodb/adodb-datadict.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
// 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));
|
||
}
|
typo3/sysext/adodb/adodb/adodb-exceptions.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/adodb-csvlib.inc.php (Arbeitskopie) | ||
---|---|---|
/*
|
||
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.
|
||
... | ... | |
$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);
|
typo3/sysext/adodb/adodb/adodb-errorhandler.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/adodb-active-record.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
$_ADODB_ACTIVE_DBS = array();
|
||
$ACTIVE_RECORD_SAFETY = true;
|
||
$ADODB_ACTIVE_DEFVALS = false;
|
||
$ADODB_ACTIVE_CACHESECS = 0;
|
||
class ADODB_Active_DB {
|
||
var $db; // ADOConnection
|
||
... | ... | |
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
|
||
... | ... | |
}
|
||
|
||
|
||
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)
|
||
... | ... | |
return $ok;
|
||
}
|
||
|
||
|
||
// false on error
|
||
function Insert()
|
||
{
|
||
... | ... | |
$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;
|
||
}
|
||
... | ... | |
continue;
|
||
}
|
||
$valarr[] = $val;
|
||
$pairs[] = $name.'='.$db->Param($cnt);
|
||
$pairs[] = $this->_QName($name,$db).'='.$db->Param($cnt);
|
||
$cnt += 1;
|
||
}
|
||
|
||
... | ... | |
{
|
||
$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) {
|
typo3/sysext/adodb/adodb/adodb-iterator.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/adodb-time.inc.php (Arbeitskopie) | ||
---|---|---|
|
||
// 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)
|
||
);
|
||
|
typo3/sysext/adodb/adodb/adodb-pager.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/adodb.inc.php (Arbeitskopie) | ||
---|---|---|
/**
|
||
\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':
|
||
... | ... | |
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'";
|
||
... | ... | |
{
|
||
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))
|
||
... | ... | |
// 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);
|
||
... | ... | |
// 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);
|
||
... | ... | |
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))
|
typo3/sysext/adodb/adodb/adodb-memcache.lib.inc.php (Arbeitskopie) | ||
---|---|---|
$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) {
|
typo3/sysext/adodb/adodb/datadict/datadict-firebird.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
case 'B': return 'BLOB';
|
||
|
||
case 'D': return 'DATE';
|
||
case 'TS':
|
||
case 'T': return 'TIMESTAMP';
|
||
|
||
case 'L': return 'SMALLINT';
|
typo3/sysext/adodb/adodb/datadict/datadict-postgres.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
case 'B': return 'BYTEA';
|
||
|
||
case 'D': return 'DATE';
|
||
case 'TS':
|
||
case 'T': return 'TIMESTAMP';
|
||
|
||
case 'L': return 'BOOLEAN';
|
typo3/sysext/adodb/adodb/datadict/datadict-sybase.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
case 'B': return 'IMAGE';
|
||
|
||
case 'D': return 'DATETIME';
|
||
case 'TS':
|
||
case 'T': return 'DATETIME';
|
||
case 'L': return 'BIT';
|
||
|
typo3/sysext/adodb/adodb/datadict/datadict-mssqlnative.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/datadict/datadict-db2.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
case 'B': return 'BLOB';
|
||
case 'D': return 'DATE';
|
||
case 'TS':
|
||
case 'T': return 'TIMESTAMP';
|
||
case 'L': return 'SMALLINT';
|
typo3/sysext/adodb/adodb/datadict/datadict-sapdb.inc.php (Arbeitskopie) | ||
---|---|---|
case 'B': return 'LONG';
|
||
|
||
case 'D': return 'DATE';
|
||
case 'TS':
|
||
case 'T': return 'TIMESTAMP';
|
||
|
||
case 'L': return 'BOOLEAN';
|
typo3/sysext/adodb/adodb/datadict/datadict-informix.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
case 'B': return 'BLOB';
|
||
|
||
case 'D': return 'DATE';
|
||
case 'TS':
|
||
case 'T': return 'DATETIME YEAR TO SECOND';
|
||
|
||
case 'L': return 'SMALLINT';
|
typo3/sysext/adodb/adodb/datadict/datadict-generic.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
case 'B': return 'VARCHAR';
|
||
|
||
case 'D': return 'DATE';
|
||
case 'TS':
|
||
case 'T': return 'DATE';
|
||
|
||
case 'L': return 'DECIMAL(1)';
|
typo3/sysext/adodb/adodb/datadict/datadict-mssql.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
case 'B': return 'IMAGE';
|
||
|
||
case 'D': return 'DATETIME';
|
||
|
||
case 'TS':
|
||
case 'T': return 'DATETIME';
|
||
case 'L': return 'BIT';
|
||
|
typo3/sysext/adodb/adodb/datadict/datadict-access.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
case 'X2': return 'MEMO';
|
||
|
||
case 'B': return 'BINARY';
|
||
|
||
|
||
case 'TS':
|
||
case 'D': return 'DATETIME';
|
||
case 'T': return 'DATETIME';
|
||
|
typo3/sysext/adodb/adodb/datadict/datadict-oci8.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
case 'BLOB':
|
||
return 'B';
|
||
|
||
case 'TIMESTAMP':
|
||
return 'TS';
|
||
|
||
case 'DATE':
|
||
return 'T';
|
||
|
||
... | ... | |
case 'X2': return 'NVARCHAR2(4000)';
|
||
|
||
case 'B': return 'BLOB';
|
||
|
||
|
||
case 'TS':
|
||
return 'TIMESTAMP';
|
||
|
||
case 'D':
|
||
case 'T': return 'DATE';
|
||
case 'L': return 'NUMBER(1)';
|
typo3/sysext/adodb/adodb/datadict/datadict-ibase.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
case 'B': return 'BLOB';
|
||
|
||
case 'D': return 'DATE';
|
||
case 'TS':
|
||
case 'T': return 'TIMESTAMP';
|
||
|
||
case 'L': return 'SMALLINT';
|
typo3/sysext/adodb/adodb/datadict/datadict-mysql.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
case 'B': return 'LONGBLOB';
|
||
|
||
case 'D': return 'DATE';
|
||
case 'TS':
|
||
case 'T': return 'DATETIME';
|
||
case 'L': return 'TINYINT';
|
||
|
typo3/sysext/adodb/adodb/drivers/adodb-pdo_oci.inc.php (Arbeitskopie) | ||
---|---|---|
/*
|
||
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.
|
typo3/sysext/adodb/adodb/drivers/adodb-odbtp_unicode.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/drivers/adodb-ldap.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
$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] );
|
typo3/sysext/adodb/adodb/drivers/adodb-postgres64.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
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.
|
||
|
||
... | ... | |
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.
|
||
... | ... | |
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')";
|
||
}
|
||
|
||
... | ... | |
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]";
|
||
... | ... | |
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':
|
typo3/sysext/adodb/adodb/drivers/adodb-ado_mssql.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
return str_replace("\0", "\\\\000", $s);
|
||
}
|
||
|
||
function MetaColumns($table)
|
||
function MetaColumns($table, $normalize=true)
|
||
{
|
||
$table = strtoupper($table);
|
||
$arr= array();
|
typo3/sysext/adodb/adodb/drivers/adodb-ibase.inc.php (Arbeitskopie) | ||
---|---|---|
<?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 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?
|
||
... | ... | |
}
|
||
//OPN STUFF end
|
||
// returns array of ADOFieldObjects for current table
|
||
function MetaColumns($table)
|
||
function MetaColumns($table, $normalize=true)
|
||
{
|
||
global $ADODB_FETCH_MODE;
|
||
|
typo3/sysext/adodb/adodb/drivers/adodb-borland_ibase.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/drivers/adodb-firebird.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/drivers/adodb-sybase.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
}
|
||
|
||
// 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");
|
||
|
||
}
|
||
|
typo3/sysext/adodb/adodb/drivers/adodb-pdo_pgsql.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/drivers/adodb-sapdb.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/drivers/adodb-csv.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
return true;
|
||
}
|
||
|
||
function MetaColumns($table)
|
||
function MetaColumns($table, $normalize=true)
|
||
{
|
||
return false;
|
||
}
|
typo3/sysext/adodb/adodb/drivers/adodb-postgres7.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/drivers/adodb-postgres8.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/drivers/adodb-mssql.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
}
|
||
}
|
||
/**
|
||
* 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');
|
||
... | ... | |
|
||
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);
|
||
typo3/sysext/adodb/adodb/drivers/adodb-sqlitepo.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/drivers/adodb-access.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/drivers/adodb-oci8po.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/drivers/adodb-pdo_mssql.inc.php (Arbeitskopie) | ||
---|---|---|
/*
|
||
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.
|
typo3/sysext/adodb/adodb/drivers/adodb-ado.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
return $arr;
|
||
}
|
||
|
||
function MetaColumns($table)
|
||
function MetaColumns($table, $normalize=true)
|
||
{
|
||
$table = strtoupper($table);
|
||
$arr = array();
|
typo3/sysext/adodb/adodb/drivers/adodb-mysql.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
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)";
|
||
}
|
||
... | ... | |
return $this->_connect($argHostname, $argUsername, $argPassword, $argDatabasename);
|
||
}
|
||
|
||
function MetaColumns($table)
|
||
function MetaColumns($table, $normalize=true)
|
||
{
|
||
$this->_findschema($table,$schema);
|
||
if ($schema) {
|
typo3/sysext/adodb/adodb/drivers/adodb-mssqlnative.inc.php (Arbeitskopie) | ||
---|---|---|
<?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 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)
|
typo3/sysext/adodb/adodb/drivers/adodb-postgres.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/drivers/adodb-pdo_mysql.inc.php (Arbeitskopie) | ||
---|---|---|
/*
|
||
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.
|
typo3/sysext/adodb/adodb/drivers/adodb-fbsql.inc.php (Arbeitskopie) | ||
---|---|---|
return true;
|
||
}
|
||
|
||
function MetaColumns($table)
|
||
function MetaColumns($table, $normalize=true)
|
||
{
|
||
if ($this->metaColumnsSQL) {
|
||
|
typo3/sysext/adodb/adodb/drivers/adodb-db2.inc.php (Arbeitskopie) | ||
---|---|---|
--------------------------------------------------------------------------------------*/
|
||
class ADODB_db2 extends ADOConnection {
|
||
var $databaseType = "db2";
|
||
var $fmtDate = "'Y-m-d'";
|
||
... | ... | |
var $uCaseTables = true; // for meta* functions, uppercase table names
|
||
var $hasInsertID = true;
|
||
|
||
|
||
function _insertid()
|
||
{
|
||
return ADOConnection::GetOne('VALUES IDENTITY_VAL_LOCAL()');
|
||
... | ... | |
// 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 = '';
|
||
... | ... | |
// 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;
|
||
}
|
||
|
||
... | ... | |
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 = '';
|
||
... | ... | |
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;
|
||
}
|
||
... | ... | |
return ADOConnection::ServerInfo();
|
||
}
|
||
}
|
||
|
||
function CreateSequence($seqname='adodbseq',$start=1)
|
||
{
|
||
... | ... | |
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.
|
||
... | ... | |
}
|
||
|
||
$arr = $rs->GetArray();
|
||
|
||
$rs->Close();
|
||
$arr2 = array();
|
||
|
||
... | ... | |
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;
|
||
}
|
||
... | ... | |
}
|
||
}
|
||
|
||
function MetaColumns($table)
|
||
function MetaColumns($table, $normalize=true)
|
||
{
|
||
global $ADODB_FETCH_MODE;
|
||
|
||
... | ... | |
return $retarr;
|
||
}
|
||
|
||
|
||
function Prepare($sql)
|
||
{
|
||
if (! $this->_bindInputArray) return $sql; // no binding
|
typo3/sysext/adodb/adodb/drivers/adodb-sybase_ase.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
typo3/sysext/adodb/adodb/drivers/adodb-mysqli.inc.php (Arbeitskopie) | ||
---|---|---|
<?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.
|
||
... | ... | |
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()
|
||
{
|
||
... | ... | |
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);
|
||
}
|
||
|
||
... | ... | |
return $foreign_keys;
|
||
}
|
||
|
||
function MetaColumns($table)
|
||
function MetaColumns($table, $normalize=true)
|
||
{
|
||
$false = false;
|
||
if (!$this->metaColumnsSQL)
|
||
... | ... | |
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 );
|