本文整理汇总了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;
}
}
示例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];
}
示例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];
}
示例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];
}
示例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;
}
示例6: getServerVersion
public function getServerVersion()
{
set_error_handler(static::getErrorHandler());
$serverVersion = oci_server_version($this->resource);
restore_error_handler();
return $serverVersion;
}
示例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'];
}
示例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;
}
示例9: _version
/**
* Version number query string
*
* @access protected
* @return string
*/
protected function _version()
{
return oci_server_version($this->conn_id);
}
示例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;
}
示例11: version
public function version()
{
if (!empty($this->connect)) {
return oci_server_version($this->connect);
} else {
return false;
}
}
示例12: server_info
/**
* 获取服务器信息
*
* @return string 服务器信息
*/
public function server_info()
{
return oci_server_version($this->db_link);
}
示例13: getDbInfo
public function getDbInfo()
{
return array("Server version" => @oci_server_version($this->database), "Express" => $this->isExpress());
}
示例14: php_sql
function php_sql()
{
$get_version = explode("-", oci_server_version($this->dbh));
return "ENV: php " . phpversion() . "[Oracle " . $get_version[0] . "]";
}
示例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;
}