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
+37 -41
View File
@@ -1,17 +1,19 @@
<?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
Microsoft SQL Server ADO data driver. Requires ADO and MSSQL client.
Microsoft SQL Server ADO data driver. Requires ADO and MSSQL client.
Works only on MS Windows.
Warning: Some versions of PHP (esp PHP4) leak memory when ADO/COM is used.
Warning: Some versions of PHP (esp PHP4) leak memory when ADO/COM is used.
Please check http://bugs.php.net/ for more info.
*/
@@ -24,7 +26,7 @@ if (!defined('_ADODB_ADO_LAYER')) {
}
class ADODB_ado_mssql extends ADODB_ado {
class ADODB_ado_mssql extends ADODB_ado {
var $databaseType = 'ado_mssql';
var $hasTop = 'top';
var $hasInsertID = true;
@@ -36,25 +38,20 @@ class ADODB_ado_mssql extends ADODB_ado {
var $substr = "substring";
var $length = 'len';
var $_dropSeqSQL = "drop table %s";
//var $_inTransaction = 1; // always open recordsets, so no transaction problems.
function ADODB_ado_mssql()
{
$this->ADODB_ado();
}
function _insertid()
{
return $this->GetOne('select SCOPE_IDENTITY()');
}
function _affectedrows()
{
return $this->GetOne('select @@rowcount');
}
function SetTransactionMode( $transaction_mode )
function SetTransactionMode( $transaction_mode )
{
$this->_transmode = $transaction_mode;
if (empty($transaction_mode)) {
@@ -64,25 +61,25 @@ class ADODB_ado_mssql extends ADODB_ado {
if (!stristr($transaction_mode,'isolation')) $transaction_mode = 'ISOLATION LEVEL '.$transaction_mode;
$this->Execute("SET TRANSACTION ".$transaction_mode);
}
function qstr($s,$magic_quotes=false)
{
$s = ADOConnection::qstr($s, $magic_quotes);
return str_replace("\0", "\\\\000", $s);
}
function MetaColumns($table, $normalize=true)
{
$table = strtoupper($table);
$arr= array();
$dbc = $this->_connectionID;
$osoptions = array();
$osoptions[0] = null;
$osoptions[1] = null;
$osoptions[2] = $table;
$osoptions[3] = null;
$adors=@$dbc->OpenSchema(4, $osoptions);//tables
if ($adors){
@@ -93,7 +90,7 @@ class ADODB_ado_mssql extends ADODB_ado {
$fld->type = 'CHAR'; // cannot discover type in ADO!
$fld->max_length = -1;
$arr[strtoupper($fld->name)]=$fld;
$adors->MoveNext();
}
$adors->Close();
@@ -101,10 +98,10 @@ class ADODB_ado_mssql extends ADODB_ado {
$false = false;
return empty($arr) ? $false : $arr;
}
function CreateSequence($seq='adodbseq',$start=1)
{
$this->Execute('BEGIN TRANSACTION adodbseq');
$start -= 1;
$this->Execute("create table $seq (id float(53))");
@@ -113,7 +110,7 @@ class ADODB_ado_mssql extends ADODB_ado {
$this->Execute('ROLLBACK TRANSACTION adodbseq');
return false;
}
$this->Execute('COMMIT TRANSACTION adodbseq');
$this->Execute('COMMIT TRANSACTION adodbseq');
return true;
}
@@ -129,26 +126,25 @@ class ADODB_ado_mssql extends ADODB_ado {
$this->Execute('ROLLBACK TRANSACTION adodbseq');
return false;
}
$this->Execute('COMMIT TRANSACTION adodbseq');
$this->Execute('COMMIT TRANSACTION adodbseq');
return $start;
}
$num = $this->GetOne("select id from $seq");
$this->Execute('COMMIT TRANSACTION adodbseq');
$this->Execute('COMMIT TRANSACTION adodbseq');
return $num;
// in old implementation, pre 1.90, we returned GUID...
//return $this->GetOne("SELECT CONVERT(varchar(255), NEWID()) AS 'Char'");
}
} // end class
class ADORecordSet_ado_mssql extends ADORecordSet_ado {
} // end class
class ADORecordSet_ado_mssql extends ADORecordSet_ado {
var $databaseType = 'ado_mssql';
function ADORecordSet_ado_mssql($id,$mode=false)
function __construct($id,$mode=false)
{
return $this->ADORecordSet_ado($id,$mode);
return parent::__construct($id,$mode);
}
}
?>