當前位置: 首頁>>代碼示例>>PHP>>正文


PHP oci_server_version函數代碼示例

本文整理匯總了PHP中oci_server_version函數的典型用法代碼示例。如果您正苦於以下問題:PHP oci_server_version函數的具體用法?PHP oci_server_version怎麽用?PHP oci_server_version使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了oci_server_version函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getAttribute

 public function getAttribute($attribute, &$source = null, $func = 'PDO::getAttribute', &$last_error = null)
 {
     switch ($attribute) {
         case PDO::ATTR_AUTOCOMMIT:
             return $this->autocommit;
             break;
         case PDO::ATTR_PREFETCH:
             break;
         case PDO::ATTR_CLIENT_VERSION:
             return oci_server_version($this->link);
             break;
         case PDO::ATTR_SERVER_VERSION:
             $ver = oci_server_version($this->link);
             if (preg_match('/([0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+)/', $ver, $match)) {
                 return $match[1];
             }
             return $ver;
             break;
         case PDO::ATTR_SERVER_INFO:
             return oci_server_version($this->link);
             break;
         default:
             return parent::getAttribute($attribute, $source, $func, $last_error);
             break;
     }
 }
開發者ID:Deepab23,項目名稱:clinic,代碼行數:26,代碼來源:oci.php

示例2: getServerVersion

 /**
  * {@inheritdoc}
  *
  * @throws \UnexpectedValueException if the version string returned by the database server
  *                                   does not contain a parsable version number.
  */
 public function getServerVersion()
 {
     if (!preg_match('/\\s+(\\d+\\.\\d+\\.\\d+\\.\\d+\\.\\d+)\\s+/', oci_server_version($this->dbh), $version)) {
         throw new \UnexpectedValueException(sprintf('Unexpected database version string "%s". Cannot parse an appropriate version number from it. ' . 'Please report this database version string to the Doctrine team.', oci_server_version($this->dbh)));
     }
     return $version[1];
 }
開發者ID:BozzaCoon,項目名稱:SPHERE-Framework,代碼行數:13,代碼來源:OCI8Connection.php

示例3: getServerVersion

 /**
  * Returns oracle version.
  *
  * @throws \UnexpectedValueException if the version string returned by the database server does not parsed
  * @return int Version number
  */
 public function getServerVersion()
 {
     $versionData = oci_server_version($this->dbh);
     if (!preg_match('/\\s+(\\d+\\.\\d+\\.\\d+\\.\\d+\\.\\d+)\\s+/', $versionData, $version)) {
         throw new \UnexpectedValueException(__('Unexpected database version string "{0}" that not parsed.', $versionData));
     }
     return $version[1];
 }
開發者ID:cakedc,項目名稱:cakephp-oracle-driver,代碼行數:14,代碼來源:OCI8Connection.php

示例4: connect

 /**
 +----------------------------------------------------------
 * 連接數據庫方法
 +----------------------------------------------------------
 * @access public
 +----------------------------------------------------------
 * @throws ThinkExecption
 +----------------------------------------------------------
 */
 public function connect($config = '', $linkNum = 0)
 {
     if (!isset($this->linkID[$linkNum])) {
         if (empty($config)) {
             $config = $this->config;
         }
         $conn = $this->pconnect ? 'oci_pconnect' : 'oci_new_connect';
         $this->linkID[$linkNum] = $conn($config['username'], $config['password'], "//{$config['hostname']}:{$config['hostport']}/{$config['database']}");
         //modify by wyfeng at 2008.12.19
         if (!$this->linkID[$linkNum]) {
             $error = $this->error(false);
             throw_exception($error["message"], '', $error["code"]);
             return false;
         }
         $this->dbVersion = oci_server_version($this->linkID[$linkNum]);
         // 標記連接成功
         $this->connected = true;
         //注銷數據庫安全信息
         if (1 != C('DB_DEPLOY_TYPE')) {
             unset($this->config);
         }
     }
     return $this->linkID[$linkNum];
 }
開發者ID:dalinhuang,項目名稱:concourse,代碼行數:33,代碼來源:DbOracle.class.php

示例5: sql_server_info

	/**
	* Version information about used database
	* @param bool $raw if true, only return the fetched sql_server_version
	* @return string sql server version
	*/
	function sql_server_info($raw = false) {
		$this->sql_server_version = @oci_server_version($this->connect);

		return $this->sql_server_version;
	}
開發者ID:nopticon,項目名稱:rockr,代碼行數:10,代碼來源:class.oracle.php

示例6: getServerVersion

 public function getServerVersion()
 {
     set_error_handler(static::getErrorHandler());
     $serverVersion = oci_server_version($this->resource);
     restore_error_handler();
     return $serverVersion;
 }
開發者ID:jpina,項目名稱:oci8,代碼行數:7,代碼來源:Oci8Connection.php

示例7: getServerVersion

 /**
  * @return string Version information from the database
  */
 function getServerVersion()
 {
     //better version number, fallback on driver
     $rset = $this->doQuery('SELECT version FROM product_component_version WHERE UPPER(product) LIKE \'ORACLE DATABASE%\'');
     if (!($row = $rset->fetchRow())) {
         return oci_server_version($this->mConn);
     }
     return $row['version'];
 }
開發者ID:Tjorriemorrie,項目名稱:app,代碼行數:12,代碼來源:DatabaseOracle.php

示例8: getDbInfo

 /**
  * @return array|mixed
  */
 public function getDbInfo()
 {
     $arrReturn = array();
     $arrReturn["dbdriver"] = "oci8-oracle-extension";
     $arrReturn["dbserver"] = oci_server_version($this->linkDB);
     $arrReturn["dbclient"] = function_exists("oci_client_version") ? oci_client_version($this->linkDB) : "";
     return $arrReturn;
 }
開發者ID:jinshana,項目名稱:kajonacms,代碼行數:11,代碼來源:class_db_oci8.php

示例9: _version

 /**
  * Version number query string
  *
  * @access  protected
  * @return  string
  */
 protected function _version()
 {
     return oci_server_version($this->conn_id);
 }
開發者ID:wiliamdecosta,項目名稱:ifalconi_oci_responsive,代碼行數:10,代碼來源:oci8_driver.php

示例10: versionOracle

function versionOracle()
{
    ///////////////////////
    ///////////////////////
    //////////////////////
    // TODO EN PDO
    $conn = oci_connect('scott', 'tiger', '10.0.220.100:1521/ORAPROF');
    $version = oci_server_version($conn);
    oci_close($conn);
    return $version;
}
開發者ID:erwanLeGuen,項目名稱:PPE,代碼行數:11,代碼來源:AccesDonnees.php

示例11: version

 public function version()
 {
     if (!empty($this->connect)) {
         return oci_server_version($this->connect);
     } else {
         return false;
     }
 }
開發者ID:znframework,項目名稱:znframework,代碼行數:8,代碼來源:Oracle.php

示例12: server_info

 /**
  * 獲取服務器信息
  *
  * @return string 服務器信息
  */
 public function server_info()
 {
     return oci_server_version($this->db_link);
 }
開發者ID:laiello,項目名稱:hecart,代碼行數:9,代碼來源:oci.php

示例13: getDbInfo

 public function getDbInfo()
 {
     return array("Server version" => @oci_server_version($this->database), "Express" => $this->isExpress());
 }
開發者ID:jglaine,項目名稱:sugar761-ent,代碼行數:4,代碼來源:OracleManager.php

示例14: php_sql

 function php_sql()
 {
     $get_version = explode("-", oci_server_version($this->dbh));
     return "ENV: php " . phpversion() . "[Oracle " . $get_version[0] . "]";
 }
開發者ID:chaobj001,項目名稱:tt,代碼行數:5,代碼來源:DBOracle.class.php

示例15: ServerInfo

 function ServerInfo()
 {
     $arr['compat'] = $this->GetOne('select value from sys.database_compatible_level');
     $arr['description'] = @oci_server_version($this->_connectionID);
     $arr['version'] = ADOConnection::_findvers($arr['description']);
     return $arr;
 }
開發者ID:advancingdesign,項目名稱:ADOdb,代碼行數:7,代碼來源:adodb-oci8.inc.php


注:本文中的oci_server_version函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。