Search DaTutorials:  
HOME
Php Tutorials
Articles
Basics
Date and Time
File Manipulations
Forms
Functions
General
Interactivity
MySql
Navigation
News,Shoutboxes and Blogs
Language Structure and Data Types
Searching
Security
String Manipulation
User Information and Stats
Search For a Tutorial
Php Reference

mysql_get_server_info

(PHP 4 >= 4.0.5, PHP 5)

mysql_get_server_info -- Get MySQL server info

Description

string mysql_get_server_info ( [resource link_identifier])

mysql_get_server_info() returns the server version used by connection link_identifier. If link_identifier is omitted, the last opened connection will be used.

Example 1. mysql_get_server_info() example

<?php
$link
= mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!
$link) {
   die(
'Could not connect: ' . mysql_error());
}
printf("MySQL server version: %s\n", mysql_get_server_info());
?>

The above example would produce the following output:

MySQL server version: 4.0.1-alpha

See also mysql_get_client_info(), mysql_get_host_info() and mysql_get_proto_info().



Copyright © 2001-2004 The PHP Group
All rights reserved.

     Credit Report | Car Insurance | Direct TV | Mortgage Loans | Loans
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp