PHP mysqli_get_connection_stats() function returns client connection statistics.
Syntax
array mysqli_get_connection_stats(connection);
Parameter | Description |
---|---|
Connection : | Required parameter. The MySQL connection to be used. |
Return Values : | Returns an array with connection stats if success, FALSE otherwise. |
<?php $con = mysqli_get_charset("localhost","user","password","db"); if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } // Get MySQL client connection statistics echo mysqli_get_connection_stats($con); ?>