本文整理汇总了PHP中ociserverversion函数的典型用法代码示例。如果您正苦于以下问题:PHP ociserverversion函数的具体用法?PHP ociserverversion怎么用?PHP ociserverversion使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ociserverversion函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sql_server_info
/**
* Version information about used database
* @param bool $raw if true, only return the fetched sql_server_version
* @param bool $use_cache forced to false for Oracle
* @return string sql server version
*/
function sql_server_info($raw = false, $use_cache = true)
{
/**
* force $use_cache false. I didn't research why the caching code below is commented out
* but I assume its because the Oracle extension provides a direct method to access it
* without a query.
*/
$use_cache = false;
/*
global $cache;
if (empty($cache) || ($this->sql_server_version = $cache->get('oracle_version')) === false)
{
$result = @ociparse($this->db_connect_id, 'SELECT * FROM v$version WHERE banner LIKE \'Oracle%\'');
@ociexecute($result, OCI_DEFAULT);
@ocicommit($this->db_connect_id);
$row = array();
@ocifetchinto($result, $row, OCI_ASSOC + OCI_RETURN_NULLS);
@ocifreestatement($result);
$this->sql_server_version = trim($row['BANNER']);
$cache->put('oracle_version', $this->sql_server_version);
}
*/
$this->sql_server_version = @ociserverversion($this->db_connect_id);
return $this->sql_server_version;
}
示例2: getServerVersion
/**
* This function will return the version of the database server software.
*
* @returns The version of the database server software.
*/
function getServerVersion()
{
// Connect
$result = $this->connect();
// Handle errors
if (!$result && $this->_failOnError === true) {
$error = ocierror();
trigger_error($error['message'], YD_ERROR);
}
// Return the version
return 'Oracle ' . ociserverversion($this->_conn);
}
示例3: 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)
{
/*
global $cache;
if (empty($cache) || ($this->sql_server_version = $cache->get('oracle_version')) === false)
{
$result = @ociparse($this->db_connect_id, 'SELECT * FROM v$version WHERE banner LIKE \'Oracle%\'');
@ociexecute($result, OCI_DEFAULT);
@ocicommit($this->db_connect_id);
$row = array();
@ocifetchinto($result, $row, OCI_ASSOC + OCI_RETURN_NULLS);
@ocifreestatement($result);
$this->sql_server_version = trim($row['BANNER']);
$cache->put('oracle_version', $this->sql_server_version);
}
*/
$this->sql_server_version = @ociserverversion($this->db_connect_id);
return $this->sql_server_version;
}
示例4: function_exists
<td align="left"><?php
echo function_exists('mysql_connect') ? '<b class="ok">' . $okImg . '</b><span class="item"> (' . @mysql_get_server_info() . ')</span>' : '<span class="warning">' . $failedImg . ' Not available</span>';
?>
</td>
</tr>
<tr>
<td class="item"><li>ODBC Support</li></td>
<td align="left"><?php
echo function_exists('odbc_connect') ? '<b class="ok">' . $okImg . '</b><span class="item"></span>' : '<span class="warning">' . $failedImg . ' Not available</span>';
?>
</td>
</tr>
<tr>
<td class="item"><li>Oracle Support</li></td>
<td align="left"><?php
echo function_exists('oci_connect') ? '<b class="ok">' . $okImg . '</b><span class="item"> (' . ociserverversion() . ')</span>' : '<span class="warning">' . $failedImg . ' Not available</span>';
?>
</td>
</tr>
<tr>
<td class="item"><li>PostgreSQL Support</li></td>
<td align="left"><?php
echo function_exists('pg_connect') ? '<b class="ok">' . $okImg . '</b><span class="item"></span>' : '<span class="warning">' . $failedImg . ' Not available</span>';
?>
</td>
</tr>
<tr>
<td class="item"><li>SQLite Support</li></td>
<td align="left"><?php
echo function_exists('sqlite_open') ? '<b class="ok">' . $okImg . '</b><span class="item"> (' . sqlite_libversion() . ')</span>' : '<span class="warning">' . $failedImg . ' Not available</span>';
?>
示例5: _version
/**
* Version number query string
*
* @access public
* @return string
*/
function _version()
{
return ociserverversion($this->conn_id);
}
示例6: getServerVersion
/**
* This function will return the version of the database server software.
*
* @returns The version of the database server software.
*/
function getServerVersion()
{
$this->connect();
return 'Oracle ' . ociserverversion($this->_conn);
}
示例7: _version
/**
* Version number query string
*
* @access public
* @return string
*/
function _version()
{
$ver = ociserverversion($this->conn_id);
return $ver;
}
示例8: sql_server_info
/**
* Version information about used database
*/
function sql_server_info()
{
return @ociserverversion($this->db_connect_id);
}
示例9: getServerVersion
/**
* return version information about the server
*
* @param bool $native determines if the raw version string should be returned
* @return mixed array/string with version information or MDB2 error object
* @access public
*/
function getServerVersion($native = false)
{
$connection = $this->getConnection();
if (PEAR::isError($connection)) {
return $connection;
}
if ($this->connected_server_info) {
$server_info = $this->connected_server_info;
} else {
$server_info = @ociserverversion($connection);
}
if (!$server_info) {
return $this->raiseError(null, null, null, 'Could not get server information', __FUNCTION__);
}
// cache server_info
$this->connected_server_info = $server_info;
if (!$native) {
if (!preg_match('/ (\\d+)\\.(\\d+)\\.(\\d+)\\.([\\d\\.]+) /', $server_info, $tmp)) {
return $this->raiseError(MDB2_ERROR_INVALID, null, null, 'Could not parse version information:' . $server_info, __FUNCTION__);
}
$server_info = array('major' => $tmp[1], 'minor' => $tmp[2], 'patch' => $tmp[3], 'extra' => $tmp[4], 'native' => $server_info);
}
return $server_info;
}
示例10: ociserverversion
<td><span class="warning">Not available</span></td>
<?php
}
?>
</tr>
<tr class="second">
<td class="item"><li>Oracle Support</li></td>
<?php
if (function_exists('oci_connect')) {
?>
<td align="left"><?php
echo $okImg;
?>
</td>
<td><b class="message"><span class="item"> (<?php
echo ociserverversion();
?>
)</span></b></td>
<?php
} else {
?>
<td align="left"><?php
echo $failedImg;
?>
</td>
<td><span class="warning">Not available</span></td>
<?php
}
?>
</tr>
<tr class="second">
示例11: getVersion
public function getVersion()
{
return @ociserverversion($this->_hMaster);
}
示例12: ocidefinebyname
ocidefinebyname();
ocierror();
ociexecute();
ocifetch();
ocifetchinto();
ocifetchstatement();
ocifreecollection();
ocifreecursor();
ocifreedesc();
ocifreestatement();
ociinternaldebug();
ociloadlob();
ocilogoff();
ocilogon();
ocinewcollection();
ocinewcursor();
ocinewdescriptor();
ocinlogon();
ocinumcols();
ociparse();
ociplogon();
ociresult();
ocirollback();
ocirowcount();
ocisavelob();
ocisavelobfile();
ociserverversion();
ocisetprefetch();
ocistatementtype();
ociwritelobtofile();
ociwritetemporarylob();