PHP mysqli_stat() Function

Definition

The mysqli_stat() function returns the current system status.

Syntax

PHP mysqli_stat() Function has the following syntax.

mysqli_stat(connection);

Example

Get the current system status


<?php/*ww  w.j  a  va2  s .  com*/
    $con=mysqli_connect("localhost","my_user","my_password","my_db");
    // Check connection
    if (mysqli_connect_errno($con)){
       echo "Failed to connect to MySQL: " . mysqli_connect_error();
    }
    
    echo "System status: ". mysqli_stat($con); 
    
    mysqli_close($con);
?>




















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions