当前位置: 首页>>代码示例>>PHP>>正文


PHP odbtp_get_attr函数代码示例

本文整理汇总了PHP中odbtp_get_attr函数的典型用法代码示例。如果您正苦于以下问题:PHP odbtp_get_attr函数的具体用法?PHP odbtp_get_attr怎么用?PHP odbtp_get_attr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了odbtp_get_attr函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _connect

 function _connect($HostOrInterface, $UserOrDSN = '', $argPassword = '', $argDatabase = '')
 {
     $this->_connectionID = @odbtp_connect($HostOrInterface, $UserOrDSN, $argPassword, $argDatabase);
     if ($this->_connectionID === false) {
         $this->_errorMsg = $this->ErrorMsg();
         return false;
     }
     $this->odbc_driver = @odbtp_get_attr(ODB_ATTR_DRIVER, $this->_connectionID);
     // Set driver specific attributes
     switch ($this->odbc_driver) {
         case ODB_DRIVER_MSSQL:
             $this->fmtDate = "'Y-m-d'";
             $this->fmtTimeStamp = "'Y-m-d h:i:sA'";
             $this->sysDate = 'convert(datetime,convert(char,GetDate(),102),102)';
             $this->sysTimeStamp = 'GetDate()';
             $this->ansiOuter = true;
             $this->leftOuter = '*=';
             $this->rightOuter = '=*';
             $this->hasTop = 'top';
             $this->hasInsertID = true;
             $this->hasTransactions = true;
             $this->_bindInputArray = true;
             $this->_canSelectDb = true;
             $this->substr = "substring";
             $this->length = 'len';
             $this->upperCase = 'upper';
             $this->identitySQL = 'select @@IDENTITY';
             $this->metaDatabasesSQL = "select name from master..sysdatabases where name <> 'master'";
             break;
         case ODB_DRIVER_JET:
             $this->fmtDate = "#Y-m-d#";
             $this->fmtTimeStamp = "#Y-m-d h:i:sA#";
             $this->sysDate = "FORMAT(NOW,'yyyy-mm-dd')";
             $this->sysTimeStamp = 'NOW';
             $this->hasTop = 'top';
             $this->hasTransactions = false;
             $this->_canPrepareSP = true;
             // For MS Access only.
             // Can't rebind ODB_CHAR to ODB_WCHAR if row cache enabled.
             if ($this->_useUnicodeSQL) {
                 odbtp_use_row_cache($this->_connectionID, FALSE, 0);
             }
             break;
         case ODB_DRIVER_FOXPRO:
             $this->fmtDate = "{^Y-m-d}";
             $this->fmtTimeStamp = "{^Y-m-d, h:i:sA}";
             $this->sysDate = 'date()';
             $this->sysTimeStamp = 'datetime()';
             $this->ansiOuter = true;
             $this->hasTop = 'top';
             $this->hasTransactions = false;
             $this->replaceQuote = "'+chr(39)+'";
             $this->true = '.T.';
             $this->false = '.F.';
             $this->upperCase = 'upper';
             break;
         case ODB_DRIVER_ORACLE:
             $this->fmtDate = "'Y-m-d 00:00:00'";
             $this->fmtTimeStamp = "'Y-m-d h:i:sA'";
             $this->sysDate = 'TRUNC(SYSDATE)';
             $this->sysTimeStamp = 'SYSDATE';
             $this->hasTransactions = true;
             $this->_bindInputArray = true;
             $this->concat_operator = '||';
             break;
         case ODB_DRIVER_SYBASE:
             $this->fmtDate = "'Y-m-d'";
             $this->fmtTimeStamp = "'Y-m-d H:i:s'";
             $this->sysDate = 'GetDate()';
             $this->sysTimeStamp = 'GetDate()';
             $this->leftOuter = '*=';
             $this->rightOuter = '=*';
             $this->hasInsertID = true;
             $this->hasTransactions = true;
             $this->upperCase = 'upper';
             $this->identitySQL = 'select @@IDENTITY';
             break;
         default:
             if (@odbtp_get_attr(ODB_ATTR_TXNCAPABLE, $this->_connectionID)) {
                 $this->hasTransactions = true;
             } else {
                 $this->hasTransactions = false;
             }
     }
     @odbtp_set_attr(ODB_ATTR_FULLCOLINFO, TRUE, $this->_connectionID);
     if ($this->_useUnicodeSQL) {
         @odbtp_set_attr(ODB_ATTR_UNICODESQL, TRUE, $this->_connectionID);
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:facturaphp-svn,代码行数:90,代码来源:adodb-odbtp.inc.php

示例2: _initrs

 function _initrs()
 {
     $this->_numOfFields = @odbtp_num_fields($this->_queryID);
     if (!($this->_numOfRows = @odbtp_num_rows($this->_queryID))) {
         $this->_numOfRows = -1;
     }
     if (!$this->connection->_useUnicodeSQL) {
         return;
     }
     if ($this->connection->odbc_driver == ODB_DRIVER_JET) {
         if (!@odbtp_get_attr(ODB_ATTR_MAPCHARTOWCHAR, $this->connection->_connectionID)) {
             for ($f = 0; $f < $this->_numOfFields; $f++) {
                 if (@odbtp_field_bindtype($this->_queryID, $f) == ODB_CHAR) {
                     @odbtp_bind_field($this->_queryID, $f, ODB_WCHAR);
                 }
             }
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:vhcs-svn,代码行数:19,代码来源:adodb-odbtp.inc.php

示例3: _connect

 function _connect($argHost, $argUsername = '', $argPassword = '', $argDSN = '', $persist = false)
 {
     if ($argUsername) {
         $argDSN .= ";uid={$argUsername}";
     }
     if ($argPassword) {
         $argDSN .= ";pwd={$argPassword}";
     }
     if ($persist) {
         $this->_connectionID = @odbtp_rconnect($argHost, $argDSN);
     } else {
         $this->_connectionID = @odbtp_connect($argHost, $argDSN);
     }
     if ($this->_connectionID === false) {
         $this->_errorMsg = $this->ErrorMsg();
         return false;
     }
     $this->odbc_driver = @odbtp_get_attr(ODB_ATTR_DRIVER, $this->_connectionID);
     //$this->oic_level = @odbtp_get_attr(ODB_ATTR_OICLEVEL, $this->_connectionID);
     $tc = @odbtp_get_attr('ODB_ATTR_TXNCAPABLE', $this->_connectionID);
     if ($tc == 0) {
         $this->hasTransactions = false;
     } else {
         $this->hasTransactions = true;
     }
     return true;
 }
开发者ID:BackupTheBerlios,项目名称:browsermin,代码行数:27,代码来源:adodb-odbtp.inc.php


注:本文中的odbtp_get_attr函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。