PHP mysqli_get_client_version() Function
In this chapter you will learn:
- Definition for PHP mysqli_get_client_version() Function
- Syntax for PHP mysqli_get_client_version() Function
- Parameter for PHP mysqli_get_client_version() Function
- Return for PHP mysqli_get_client_version() Function
- Example - Returns the MySQL client library version as an integer
Definition
The mysqli_get_client_version() function returns the MySQL client library version as an integer.
Syntax
Object oriented style
int $mysqli->client_version;
Procedural style
int mysqli_get_client_version ( mysqli $link )
Parameter
Parameter | Is Required | Description |
---|---|---|
connection | Optional. | MySQL connection |
Return
The mysqli_get_client_version() function returns the MySQL client library version as an integer.
Example
For example, 5.1.0 is returned as 50100.
The following gets the MySQL client library version as an integer.
<?php/*from j a v a2s .c o m*/
$con=mysqli_connect("localhost","my_user","my_password","my_db");
if (mysqli_connect_errno($con)){
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
print_r(mysqli_get_client_version($con));
mysqli_close($con);
?>
Next chapter...
What you will learn in the next chapter:
- Definition for PHP mysqli_get_connection_stats() Function
- Syntax for PHP mysqli_get_connection_stats() Function
- Parameter for PHP mysqli_get_connection_stats() Function
- Return for PHP mysqli_get_connection_stats() Function
- Example - gets stats about the client connection
Home » PHP Tutorial » PHP MySQLi Functions