Web студия "GrandView"
  Главная   Написать Контакты
   
   
О проекте
Руководство php
 

mysql_get_server_info

(PHP 4 >= 4.0.5, PHP 5)

mysql_get_server_info -- Возвращает информацию о сервере MySQL

Описание

string mysql_get_server_info ( [resource link_identifier] )

mysql_get_server_info() возвращает версию сервера, на соединение с которым ссылается переданный функции указатель link_identifier. Если параметр link_identifier опущен, будет использовано последнее открытое соединение.

Пример 1. Пример использования mysql_get_server_info()

<?php
    mysql_connect
("localhost", "mysql_user", "mysql_password") or
        die(
"Could not connect: " . mysql_error());
   
printf ("MySQL server version: %s\n", mysql_get_server_info());
?>

Вышеописанный пример выдаст следующий результат:

MySQL server version: 4.0.1-alpha

См. также mysql_get_client_info(), mysql_get_host_info() и mysql_get_proto_info().



add a note add a note User Contributed Notes
mysql_get_server_info
Kalle Sommer Nielsen
29-May-2007 04:54
An alternative to mysql_get_client_info() is to use the VERSION() function in MySQL language like:

<?php
$query
= mysql_query("SELECT VERSION() as mysql_version");
?>

The output is the same as mysql_get_client_info()
cNOooSPAMlmax1 at o2 dot pl
08-Jul-2006 04:27
That's better:

<?php
mysql_connect
('localhost', 'user', 'password') or
   die(
'Could not connect: ' . mysql_error());
$a = mysql_get_server_info();
$b = substr($a, 0, strpos($a, "-"));
echo
$b;
?>

mysql_info> <mysql_get_proto_info
Last updated: Sat, 27 Jan 2007
 
 
Новости
11 июля 2007
Сайт запущен
© 2007 info@grandviewstudio.com

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 324

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/sites/grandviewstudiocom/www/65f67d67a94ad980786580ae69e11c07/sape.php on line 330
Z058440144362 Z348613067571