diff options
Diffstat (limited to 'drivers/adodb-ado_mssql.inc.php')
| -rw-r--r-- | drivers/adodb-ado_mssql.inc.php | 62 |
1 files changed, 29 insertions, 33 deletions
diff --git a/drivers/adodb-ado_mssql.inc.php b/drivers/adodb-ado_mssql.inc.php index c3203da2..6923b850 100644 --- a/drivers/adodb-ado_mssql.inc.php +++ b/drivers/adodb-ado_mssql.inc.php @@ -1,6 +1,6 @@ <?php /* -@version v5.20.10 08-Mar-2018 +@version v5.21.0-dev ??-???-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. @@ -21,8 +21,8 @@ Set tabs to 4 for best viewing. if (!defined('ADODB_DIR')) die(); if (!defined('_ADODB_ADO_LAYER')) { - if (PHP_VERSION >= 5) include(ADODB_DIR."/drivers/adodb-ado5.inc.php"); - else include(ADODB_DIR."/drivers/adodb-ado.inc.php"); + if (PHP_VERSION >= 5) include_once(ADODB_DIR."/drivers/adodb-ado5.inc.php"); + else include_once(ADODB_DIR."/drivers/adodb-ado.inc.php"); } @@ -43,12 +43,12 @@ class ADODB_ado_mssql extends ADODB_ado { function _insertid() { - return $this->GetOne('select SCOPE_IDENTITY()'); + return $this->GetOne('select SCOPE_IDENTITY()'); } function _affectedrows() { - return $this->GetOne('select @@rowcount'); + return $this->GetOne('select @@rowcount'); } function SetTransactionMode( $transaction_mode ) @@ -70,32 +70,32 @@ class ADODB_ado_mssql extends ADODB_ado { function MetaColumns($table, $normalize=true) { - $table = strtoupper($table); - $arr= array(); - $dbc = $this->_connectionID; + $table = strtoupper($table); + $arr= array(); + $dbc = $this->_connectionID; - $osoptions = array(); - $osoptions[0] = null; - $osoptions[1] = null; - $osoptions[2] = $table; - $osoptions[3] = null; + $osoptions = array(); + $osoptions[0] = null; + $osoptions[1] = null; + $osoptions[2] = $table; + $osoptions[3] = null; - $adors=@$dbc->OpenSchema(4, $osoptions);//tables + $adors=@$dbc->OpenSchema(4, $osoptions);//tables - if ($adors){ - while (!$adors->EOF){ - $fld = new ADOFieldObject(); - $c = $adors->Fields(3); - $fld->name = $c->Value; - $fld->type = 'CHAR'; // cannot discover type in ADO! - $fld->max_length = -1; - $arr[strtoupper($fld->name)]=$fld; + if ($adors){ + while (!$adors->EOF){ + $fld = new ADOFieldObject(); + $c = $adors->Fields(3); + $fld->name = $c->Value; + $fld->type = 'CHAR'; // cannot discover type in ADO! + $fld->max_length = -1; + $arr[strtoupper($fld->name)]=$fld; - $adors->MoveNext(); - } - $adors->Close(); - } - $false = false; + $adors->MoveNext(); + } + $adors->Close(); + } + $false = false; return empty($arr) ? $false : $arr; } @@ -137,14 +137,10 @@ class ADODB_ado_mssql extends ADODB_ado { //return $this->GetOne("SELECT CONVERT(varchar(255), NEWID()) AS 'Char'"); } - } // end class +} // end class - class ADORecordSet_ado_mssql extends ADORecordSet_ado { +class ADORecordSet_ado_mssql extends ADORecordSet_ado { var $databaseType = 'ado_mssql'; - function __construct($id,$mode=false) - { - return parent::__construct($id,$mode); - } } |
