sqlsrv_server_info
(No version information available, might only be in Git)
sqlsrv_server_info — Returns information about the server
Description
array sqlsrv_server_info
( resource
$conn
)Returns information about the server.
Parameters
-
conn
-
The connection resource that connects the client and the server.
Return Values
Returns an array as described in the following table:
CurrentDatabase | The connected-to database. |
---|---|
SQLServerVersion | The SQL Server version. |
SQLServerName | The name of the server. |
Examples
Example #1 sqlsrv_server_info() example
<?php
$serverName = "serverName\sqlexpress";
$conn = sqlsrv_connect( $serverName);
if( $conn === false ) {
die( print_r( sqlsrv_errors(), true));
}
$server_info = sqlsrv_server_info( $conn);
if( $server_info )
{
foreach( $server_info as $key => $value) {
echo $key.": ".$value."<br />";
}
} else {
die( print_r( sqlsrv_errors(), true));
}
?>
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Расширения для работы с базами данных
- Расширения для работы с базами данных отдельных производителей
- Microsoft SQL Server Driver for PHP
- sqlsrv_begin_transaction
- sqlsrv_cancel
- sqlsrv_client_info
- sqlsrv_close
- sqlsrv_commit
- sqlsrv_configure
- sqlsrv_connect
- sqlsrv_errors
- sqlsrv_execute
- sqlsrv_fetch_array
- sqlsrv_fetch_object
- sqlsrv_fetch
- sqlsrv_field_metadata
- sqlsrv_free_stmt
- sqlsrv_get_config
- sqlsrv_get_field
- sqlsrv_has_rows
- sqlsrv_next_result
- sqlsrv_num_fields
- sqlsrv_num_rows
- sqlsrv_prepare
- sqlsrv_query
- sqlsrv_rollback
- sqlsrv_rows_affected
- sqlsrv_send_stream_data
- sqlsrv_server_info
Коментарии
404 Not Found