本文整理匯總了PHP中sqlsrv_client_info函數的典型用法代碼示例。如果您正苦於以下問題:PHP sqlsrv_client_info函數的具體用法?PHP sqlsrv_client_info怎麽用?PHP sqlsrv_client_info使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了sqlsrv_client_info函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getServerVersion
/**
* Retrieve server version in PHP style
*
* @return string
*/
public function getServerVersion()
{
$this->_connect();
$version = sqlsrv_client_info($this->_connection);
if ($version !== false) {
return $version['DriverVer'];
}
return null;
}
示例2: client_version
/**
* Returns the libary version string.
*
* @return string
*/
public function client_version()
{
$client_info = sqlsrv_client_info($this->conn);
return $client_info['DriverODBCVer'] . ' ' . $client_info['DriverVer'];
}
示例3: verifyClientVersion
/**
* SQL Server check for client version
*
* @TODO Get this to actually check the client version.
*
* {@inheritDoc}
*/
public function verifyClientVersion() {
return array('result' => 'success', 'message' => $this->install->lexicon('sqlsrv_version_client_success',array('version' => '')));
$clientInfo = @sqlsrv_client_info();
$sqlsrvVersion = $clientInfo['DriverVer'];
$sqlsrvVersion = $this->_sanitizeVersion($sqlsrvVersion);
if (empty($sqlsrvVersion)) {
return array('result' => 'warning','message' => $this->install->lexicon('sqlsrv_version_client_nf'),'version' => $sqlsrvVersion);
}
$sqlsrv_ver_comp = version_compare($sqlsrvVersion,'10.50.0','>=');
if (!$sqlsrv_ver_comp) {
return array('result' => 'warning','message' => $this->install->lexicon('sqlsrv_version_client_old',array('version' => $sqlsrvVersion)),'version' => $sqlsrvVersion);
} else {
return array('result' => 'success','message' => $this->install->lexicon('sqlsrv_version_success',array('version' => $sqlsrvVersion)),'version' => $sqlsrvVersion);
}
}
示例4: getDbInfo
/**
* (non-PHPdoc)
* @see DBManager::getDbInfo()
* @return array
*/
public function getDbInfo()
{
$info = array_merge(sqlsrv_client_info(), sqlsrv_server_info());
return $info;
}
示例5: getClientInfo
/**
* Returns an associative array with keys described in the table below. Returns FALSE otherwise.
* ==================================================
* Key Description
* ==================================================
* DriverDllName SQLNCLI10.DLL
* DriverODBCVer ODBC version (xx.yy)
* DriverVer SQL Server Native Client DLL version (10.5.xxx)
* ExtensionVer php_sqlsrv.dll version (2.0.xxx.x)
* @return multitype:
*/
public function getClientInfo()
{
return sqlsrv_client_info($this->dbconnection);
}
示例6: testClientInfo
/**
* @depends testConnection
*/
public function testClientInfo($con)
{
echo "\nClient Info function test.\n";
// TODO: make better tests
$client_info = sqlsrv_client_info($con);
urp::info($client_info);
$this->assertTrue(is_array($client_info));
}
示例7: getDbInfo
/**
* (non-PHPdoc)
* @see DBManager::getDbInfo()
* @return array
*/
public function getDbInfo()
{
$info = array_merge(sqlsrv_client_info($this->database), sqlsrv_server_info($this->database));
return $info;
}
示例8: cs_sql_version
function cs_sql_version($cs_file)
{
global $cs_db;
$sql_infos = array('data_free' => 0, 'data_size' => 0, 'index_size' => 0, 'tables' => 0, 'names' => array());
$client = sqlsrv_client_info($cs_db['con']);
$server = sqlsrv_server_info($cs_db['con']);
$sql_infos['encoding'] = 'default';
$sql_infos['type'] = 'Microsoft SQL Server (sqlsrv)';
$sql_infos['client'] = $client['DriverVer'] . ' - ODBC ' . $client['DriverODBCVer'];
$sql_infos['host'] = $server['SQLServerName'];
$sql_infos['server'] = $server['SQLServerVersion'];
return $sql_infos;
}