adodb 최신버전으로 변경

<? 를 <?php 로 변경
This commit is contained in:
2018-01-11 19:28:35 +09:00
parent feff33715f
commit 7b3b674dee
450 changed files with 19425 additions and 32248 deletions
+38 -37
View File
@@ -1,13 +1,15 @@
<?php
/*
V5.09 25 June 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.
/*
@version v5.20.9 21-Dec-2016
@copyright (c) 2000-2013 John Lim (jlim#natsoft.com). All rights reserved.
@copyright (c) 2014 Damien Regad, Mark Newnham and the ADOdb community
Released under both BSD license and Lesser GPL library license.
Whenever there is any discrepancy between the two licenses,
the BSD license will take precedence.
Set tabs to 4 for best viewing.
Latest version is available at http://adodb.sourceforge.net
SAPDB data driver. Requires ODBC.
*/
@@ -22,7 +24,7 @@ if (!defined('ADODB_SAPDB')){
define('ADODB_SAPDB',1);
class ADODB_SAPDB extends ADODB_odbc {
var $databaseType = "sapdb";
var $databaseType = "sapdb";
var $concat_operator = '||';
var $sysDate = 'DATE';
var $sysTimeStamp = 'TIMESTAMP';
@@ -30,13 +32,13 @@ class ADODB_SAPDB extends ADODB_odbc {
var $fmtTimeStamp = "'Y-m-d H:i:s'"; /// used by DBTimeStamp as the default timestamp fmt.
var $hasInsertId = true;
var $_bindInputArray = true;
function ADODB_SAPDB()
function __construct()
{
//if (strncmp(PHP_OS,'WIN',3) === 0) $this->curmode = SQL_CUR_USE_ODBC;
$this->ADODB_odbc();
parent::__construct();
}
function ServerInfo()
{
$info = ADODB_odbc::ServerInfo();
@@ -46,14 +48,14 @@ class ADODB_SAPDB extends ADODB_odbc {
return $info;
}
function MetaPrimaryKeys($table)
function MetaPrimaryKeys($table, $owner = false)
{
$table = $this->Quote(strtoupper($table));
return $this->GetCol("SELECT columnname FROM COLUMNS WHERE tablename=$table AND mode='KEY' ORDER BY pos");
}
function MetaIndexes ($table, $primary = FALSE)
function MetaIndexes ($table, $primary = FALSE, $owner = false)
{
$table = $this->Quote(strtoupper($table));
@@ -67,7 +69,7 @@ class ADODB_SAPDB extends ADODB_odbc {
if ($this->fetchMode !== FALSE) {
$savem = $this->SetFetchMode(FALSE);
}
$rs = $this->Execute($sql);
if (isset($savem)) {
$this->SetFetchMode($savem);
@@ -91,8 +93,8 @@ class ADODB_SAPDB extends ADODB_odbc {
}
return $indexes;
}
function MetaColumns ($table)
function MetaColumns ($table, $normalize = true)
{
global $ADODB_FETCH_MODE;
$save = $ADODB_FETCH_MODE;
@@ -101,7 +103,7 @@ class ADODB_SAPDB extends ADODB_odbc {
$savem = $this->SetFetchMode(FALSE);
}
$table = $this->Quote(strtoupper($table));
$retarr = array();
foreach($this->GetAll("SELECT COLUMNNAME,DATATYPE,LEN,DEC,NULLABLE,MODE,\"DEFAULT\",CASE WHEN \"DEFAULT\" IS NULL THEN 0 ELSE 1 END AS HAS_DEFAULT FROM COLUMNS WHERE tablename=$table ORDER BY pos") as $column)
{
@@ -130,7 +132,7 @@ class ADODB_SAPDB extends ADODB_odbc {
}
}
}
$retarr[$fld->name] = $fld;
$retarr[$fld->name] = $fld;
}
if (isset($savem)) {
$this->SetFetchMode($savem);
@@ -139,14 +141,14 @@ class ADODB_SAPDB extends ADODB_odbc {
return $retarr;
}
function MetaColumnNames($table)
function MetaColumnNames($table, $numIndexes = false, $useattnum = false)
{
$table = $this->Quote(strtoupper($table));
return $this->GetCol("SELECT columnname FROM COLUMNS WHERE tablename=$table ORDER BY pos");
}
// unlike it seems, this depends on the db-session and works in a multiuser environment
function _insertid($table,$column)
{
@@ -155,30 +157,29 @@ class ADODB_SAPDB extends ADODB_odbc {
/*
SelectLimit implementation problems:
The following will return random 10 rows as order by performed after "WHERE rowno<10"
which is not ideal...
select * from table where rowno < 10 order by 1
This means that we have to use the adoconnection base class SelectLimit when
there is an "order by".
See http://listserv.sap.com/pipermail/sapdb.general/2002-January/010405.html
*/
};
class ADORecordSet_sapdb extends ADORecordSet_odbc {
var $databaseType = "sapdb";
function ADORecordSet_sapdb($id,$mode=false)
};
class ADORecordSet_sapdb extends ADORecordSet_odbc {
var $databaseType = "sapdb";
function __construct($id,$mode=false)
{
$this->ADORecordSet_odbc($id,$mode);
parent::__construct($id,$mode);
}
}
} //define
?>