TYPO3 CMS  TYPO3_6-2
ADODB_mssql Class Reference
Inheritance diagram for ADODB_mssql:
ADODB_mssqlpo

Public Member Functions

 ADODB_mssql ()
 
 ServerInfo ()
 
 IfNull ( $field, $ifNull)
 
 _insertid ()
 
 qstr ($s, $magic_quotes=false)
 
 _affectedrows ()
 
 CreateSequence ($seq='adodbseq', $start=1)
 
 GenID ($seq='adodbseq', $start=1)
 
 SelectLimit ($sql, $nrows=-1, $offset=-1, $inputarr=false, $secs2cache=0)
 
 SQLDate ($fmt, $col=false)
 
 BeginTrans ()
 
 CommitTrans ($ok=true)
 
 RollbackTrans ()
 
 SetTransactionMode ( $transaction_mode)
 
 RowLock ($tables, $where, $col='1 as adodbignore')
 
 MetaColumns ($table, $normalize=true)
 
 MetaIndexes ($table, $primary=false, $owner=false)
 
 MetaForeignKeys ($table, $owner=false, $upper=false)
 
 MetaDatabases ()
 
 MetaPrimaryKeys ($table, $owner=false)
 
 MetaTables ($ttype=false, $showSchema=false, $mask=false)
 
 SelectDB ($dbName)
 
 ErrorMsg ()
 
 ErrorNo ()
 
 _connect ($argHostname, $argUsername, $argPassword, $argDatabasename, $newconnect=false)
 
 _pconnect ($argHostname, $argUsername, $argPassword, $argDatabasename)
 
 _nconnect ($argHostname, $argUsername, $argPassword, $argDatabasename)
 
 Prepare ($sql)
 
 PrepareSP ($sql, $param=true)
 
 Concat ()
 
 Parameter (&$stmt, &$var, $name, $isOutput=false, $maxLen=4000, $type=false)
 
 UpdateBlob ($table, $column, $val, $where, $blobtype='BLOB')
 
 _query ($sql, $inputarr=false)
 
 _close ()
 

Static Public Member Functions

static UnixDate ($v)
 
static UnixTimeStamp ($v)
 

Public Attributes

 $databaseType = "mssql"
 
 $dataProvider = "mssql"
 
 $replaceQuote = "''"
 
 $fmtDate = "'Y-m-d'"
 
 $fmtTimeStamp = "'Y-m-d\TH:i:s'"
 
 $hasInsertID = true
 
 $substr = "substring"
 
 $length = 'len'
 
 $hasAffectedRows = true
 
 $metaDatabasesSQL = "select name from sysdatabases where name <> 'master'"
 
 $metaTablesSQL ="select name,case when type='U' then 'T' else 'V' end from sysobjects where (type='U' or type='V') and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE','dtproperties'))"
 
 $metaColumnsSQL
 
 $hasTop = 'top'
 
 $hasGenID = true
 
 $sysDate = 'convert(datetime,convert(char,GetDate(),102),102)'
 
 $sysTimeStamp = 'GetDate()'
 
 $_has_mssql_init
 
 $maxParameterLen = 4000
 
 $arrayClass = 'ADORecordSet_array_mssql'
 
 $uniqueSort = true
 
 $leftOuter = '*='
 
 $rightOuter = '=*'
 
 $ansiOuter = true
 
 $poorAffectedRows = true
 
 $identitySQL = 'select SCOPE_IDENTITY()'
 
 $uniqueOrderBy = true
 
 $_bindInputArray = true
 
 $forceNewConnect = false
 
 $_dropSeqSQL = "drop table %s"
 

Detailed Description

Definition at line 74 of file adodb-mssql.inc.php.

Member Function Documentation

◆ _affectedrows()

ADODB_mssql::_affectedrows ( )

Definition at line 198 of file adodb-mssql.inc.php.

◆ _close()

ADODB_mssql::_close ( )

Definition at line 837 of file adodb-mssql.inc.php.

◆ _connect()

ADODB_mssql::_connect (   $argHostname,
  $argUsername,
  $argPassword,
  $argDatabasename,
  $newconnect = false 
)

Definition at line 611 of file adodb-mssql.inc.php.

References SelectDB().

Referenced by _nconnect().

◆ _insertid()

ADODB_mssql::_insertid ( )

Definition at line 149 of file adodb-mssql.inc.php.

◆ _nconnect()

ADODB_mssql::_nconnect (   $argHostname,
  $argUsername,
  $argPassword,
  $argDatabasename 
)

Definition at line 637 of file adodb-mssql.inc.php.

References _connect().

◆ _pconnect()

ADODB_mssql::_pconnect (   $argHostname,
  $argUsername,
  $argPassword,
  $argDatabasename 
)

Definition at line 622 of file adodb-mssql.inc.php.

References SelectDB().

◆ _query()

ADODB_mssql::_query (   $sql,
  $inputarr = false 
)

Definition at line 766 of file adodb-mssql.inc.php.

References $sql, Prepare(), and qstr().

Referenced by ADODB_mssqlpo\_query().

◆ ADODB_mssql()

ADODB_mssql::ADODB_mssql ( )

Definition at line 108 of file adodb-mssql.inc.php.

Referenced by ADODB_mssqlpo\ADODB_mssqlpo().

◆ BeginTrans()

ADODB_mssql::BeginTrans ( )

Definition at line 322 of file adodb-mssql.inc.php.

Referenced by RowLock().

◆ CommitTrans()

ADODB_mssql::CommitTrans (   $ok = true)

Definition at line 330 of file adodb-mssql.inc.php.

References RollbackTrans().

◆ Concat()

ADODB_mssql::Concat ( )

Definition at line 668 of file adodb-mssql.inc.php.

◆ CreateSequence()

ADODB_mssql::CreateSequence (   $seq = 'adodbseq',
  $start = 1 
)

Definition at line 205 of file adodb-mssql.inc.php.

◆ ErrorMsg()

ADODB_mssql::ErrorMsg ( )

Definition at line 588 of file adodb-mssql.inc.php.

◆ ErrorNo()

ADODB_mssql::ErrorNo ( )

Definition at line 596 of file adodb-mssql.inc.php.

◆ GenID()

ADODB_mssql::GenID (   $seq = 'adodbseq',
  $start = 1 
)

Definition at line 220 of file adodb-mssql.inc.php.

◆ IfNull()

ADODB_mssql::IfNull (   $field,
  $ifNull 
)

Definition at line 144 of file adodb-mssql.inc.php.

◆ MetaColumns()

ADODB_mssql::MetaColumns (   $table,
  $normalize = true 
)

Definition at line 377 of file adodb-mssql.inc.php.

References $database, $rs, and SelectDB().

◆ MetaDatabases()

ADODB_mssql::MetaDatabases ( )

Definition at line 515 of file adodb-mssql.inc.php.

References $metaDatabasesSQL, and $rs.

◆ MetaForeignKeys()

ADODB_mssql::MetaForeignKeys (   $table,
  $owner = false,
  $upper = false 
)

Definition at line 475 of file adodb-mssql.inc.php.

References $sql, and qstr().

◆ MetaIndexes()

ADODB_mssql::MetaIndexes (   $table,
  $primary = false,
  $owner = false 
)

Definition at line 435 of file adodb-mssql.inc.php.

References $rs, $sql, and qstr().

◆ MetaPrimaryKeys()

ADODB_mssql::MetaPrimaryKeys (   $table,
  $owner = false 
)

Definition at line 538 of file adodb-mssql.inc.php.

References $database, and $sql.

◆ MetaTables()

ADODB_mssql::MetaTables (   $ttype = false,
  $showSchema = false,
  $mask = false 
)

Definition at line 563 of file adodb-mssql.inc.php.

References $metaTablesSQL, and qstr().

◆ Parameter()

ADODB_mssql::Parameter ( $stmt,
$var,
  $name,
  $isOutput = false,
  $maxLen = 4000,
  $type = false 
)

Definition at line 706 of file adodb-mssql.inc.php.

References debug().

Referenced by ServerInfo().

◆ Prepare()

ADODB_mssql::Prepare (   $sql)

Definition at line 642 of file adodb-mssql.inc.php.

References $sql, and qstr().

Referenced by _query().

◆ PrepareSP()

ADODB_mssql::PrepareSP (   $sql,
  $param = true 
)

Definition at line 653 of file adodb-mssql.inc.php.

References $sql.

Referenced by ServerInfo().

◆ qstr()

ADODB_mssql::qstr (   $s,
  $magic_quotes = false 
)

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());

Parameters
sthe string to quote
[magic_quotes]if $s is GET/POST var, set to get_magic_quotes_gpc(). This undoes the stupidity of magic quotes for GPC.
Returns
quoted string to be sent back to database

Definition at line 176 of file adodb-mssql.inc.php.

Referenced by _query(), MetaForeignKeys(), MetaIndexes(), MetaTables(), Prepare(), and SQLDate().

◆ RollbackTrans()

ADODB_mssql::RollbackTrans ( )

Definition at line 338 of file adodb-mssql.inc.php.

Referenced by CommitTrans().

◆ RowLock()

ADODB_mssql::RowLock (   $tables,
  $where,
  $col = '1 as adodbignore' 
)

Definition at line 369 of file adodb-mssql.inc.php.

References BeginTrans().

◆ SelectDB()

ADODB_mssql::SelectDB (   $dbName)

Definition at line 578 of file adodb-mssql.inc.php.

Referenced by _connect(), _pconnect(), and MetaColumns().

◆ SelectLimit()

ADODB_mssql::SelectLimit (   $sql,
  $nrows = -1,
  $offset = -1,
  $inputarr = false,
  $secs2cache = 0 
)

Definition at line 244 of file adodb-mssql.inc.php.

References $rs, and $sql.

◆ ServerInfo()

ADODB_mssql::ServerInfo ( )

Definition at line 113 of file adodb-mssql.inc.php.

References Parameter(), and PrepareSP().

◆ SetTransactionMode()

ADODB_mssql::SetTransactionMode (   $transaction_mode)

Definition at line 346 of file adodb-mssql.inc.php.

◆ SQLDate()

ADODB_mssql::SQLDate (   $fmt,
  $col = false 
)

Definition at line 262 of file adodb-mssql.inc.php.

References $sysTimeStamp, and qstr().

◆ UnixDate()

static ADODB_mssql::UnixDate (   $v)
static

Definition at line 846 of file adodb-mssql.inc.php.

◆ UnixTimeStamp()

static ADODB_mssql::UnixTimeStamp (   $v)
static

Definition at line 851 of file adodb-mssql.inc.php.

◆ UpdateBlob()

ADODB_mssql::UpdateBlob (   $table,
  $column,
  $val,
  $where,
  $blobtype = 'BLOB' 
)

Definition at line 754 of file adodb-mssql.inc.php.

References $sql.

Member Data Documentation

◆ $_bindInputArray

ADODB_mssql::$_bindInputArray = true

Definition at line 105 of file adodb-mssql.inc.php.

◆ $_dropSeqSQL

ADODB_mssql::$_dropSeqSQL = "drop table %s"

Definition at line 203 of file adodb-mssql.inc.php.

◆ $_has_mssql_init

ADODB_mssql::$_has_mssql_init

Definition at line 95 of file adodb-mssql.inc.php.

◆ $ansiOuter

ADODB_mssql::$ansiOuter = true

Definition at line 101 of file adodb-mssql.inc.php.

◆ $arrayClass

ADODB_mssql::$arrayClass = 'ADORecordSet_array_mssql'

Definition at line 97 of file adodb-mssql.inc.php.

◆ $databaseType

ADODB_mssql::$databaseType = "mssql"

Definition at line 75 of file adodb-mssql.inc.php.

◆ $dataProvider

ADODB_mssql::$dataProvider = "mssql"

Definition at line 76 of file adodb-mssql.inc.php.

◆ $fmtDate

ADODB_mssql::$fmtDate = "'Y-m-d'"

Definition at line 78 of file adodb-mssql.inc.php.

◆ $fmtTimeStamp

ADODB_mssql::$fmtTimeStamp = "'Y-m-d\TH:i:s'"

Definition at line 79 of file adodb-mssql.inc.php.

◆ $forceNewConnect

ADODB_mssql::$forceNewConnect = false

Definition at line 106 of file adodb-mssql.inc.php.

◆ $hasAffectedRows

ADODB_mssql::$hasAffectedRows = true

Definition at line 83 of file adodb-mssql.inc.php.

◆ $hasGenID

ADODB_mssql::$hasGenID = true

Definition at line 92 of file adodb-mssql.inc.php.

◆ $hasInsertID

ADODB_mssql::$hasInsertID = true

Definition at line 80 of file adodb-mssql.inc.php.

◆ $hasTop

ADODB_mssql::$hasTop = 'top'

Definition at line 91 of file adodb-mssql.inc.php.

◆ $identitySQL

ADODB_mssql::$identitySQL = 'select SCOPE_IDENTITY()'

Definition at line 103 of file adodb-mssql.inc.php.

◆ $leftOuter

ADODB_mssql::$leftOuter = '*='

Definition at line 99 of file adodb-mssql.inc.php.

◆ $length

ADODB_mssql::$length = 'len'

Definition at line 82 of file adodb-mssql.inc.php.

◆ $maxParameterLen

ADODB_mssql::$maxParameterLen = 4000

Definition at line 96 of file adodb-mssql.inc.php.

◆ $metaColumnsSQL

ADODB_mssql::$metaColumnsSQL
Initial value:
= # xtype==61 is datetime
"select c.name,t.name,c.length,c.isnullable, c.status,
(case when c.xusertype=61 then 0 else c.xprec end),
(case when c.xusertype=61 then 0 else c.xscale end)
from syscolumns c join systypes t on t.xusertype=c.xusertype join sysobjects o on o.id=c.id where o.name='%s'"

Definition at line 86 of file adodb-mssql.inc.php.

◆ $metaDatabasesSQL

ADODB_mssql::$metaDatabasesSQL = "select name from sysdatabases where name <> 'master'"

Definition at line 84 of file adodb-mssql.inc.php.

Referenced by MetaDatabases().

◆ $metaTablesSQL

ADODB_mssql::$metaTablesSQL ="select name,case when type='U' then 'T' else 'V' end from sysobjects where (type='U' or type='V') and (name not in ('sysallocations','syscolumns','syscomments','sysdepends','sysfilegroups','sysfiles','sysfiles1','sysforeignkeys','sysfulltextcatalogs','sysindexes','sysindexkeys','sysmembers','sysobjects','syspermissions','sysprotects','sysreferences','systypes','sysusers','sysalternates','sysconstraints','syssegments','REFERENTIAL_CONSTRAINTS','CHECK_CONSTRAINTS','CONSTRAINT_TABLE_USAGE','CONSTRAINT_COLUMN_USAGE','VIEWS','VIEW_TABLE_USAGE','VIEW_COLUMN_USAGE','SCHEMATA','TABLES','TABLE_CONSTRAINTS','TABLE_PRIVILEGES','COLUMNS','COLUMN_DOMAIN_USAGE','COLUMN_PRIVILEGES','DOMAINS','DOMAIN_CONSTRAINTS','KEY_COLUMN_USAGE','dtproperties'))"

Definition at line 85 of file adodb-mssql.inc.php.

Referenced by MetaTables().

◆ $poorAffectedRows

ADODB_mssql::$poorAffectedRows = true

Definition at line 102 of file adodb-mssql.inc.php.

◆ $replaceQuote

ADODB_mssql::$replaceQuote = "''"

Definition at line 77 of file adodb-mssql.inc.php.

◆ $rightOuter

ADODB_mssql::$rightOuter = '=*'

Definition at line 100 of file adodb-mssql.inc.php.

◆ $substr

ADODB_mssql::$substr = "substring"

Definition at line 81 of file adodb-mssql.inc.php.

◆ $sysDate

ADODB_mssql::$sysDate = 'convert(datetime,convert(char,GetDate(),102),102)'

Definition at line 93 of file adodb-mssql.inc.php.

◆ $sysTimeStamp

ADODB_mssql::$sysTimeStamp = 'GetDate()'

Definition at line 94 of file adodb-mssql.inc.php.

Referenced by SQLDate().

◆ $uniqueOrderBy

ADODB_mssql::$uniqueOrderBy = true

Definition at line 104 of file adodb-mssql.inc.php.

◆ $uniqueSort

ADODB_mssql::$uniqueSort = true

Definition at line 98 of file adodb-mssql.inc.php.