public function getDataBaseSize()
    {
        $stmt = $this->connection->query(
            "SELECT sum(data_length) / 1024 / 1024 'size' FROM information_schema.TABLES WHERE table_schema = DATABASE() GROUP BY table_schema"
        );

        if ($stmt->rowCount()) {
            return \floatval($stmt->fetch(PDO::FETCH_OBJ)->size);
        }

        throw new \Exception('Impossible to calculate the database size');
    }
public function getDataBaseSize()
    {
        $stmt = $this->connection->query(
            "SELECT sum(data_length) / 1024 / 1024 'size' FROM information_schema.TABLES WHERE table_schema = DATABASE() GROUP BY table_schema"
        );

        if ($stmt->rowCount()) {
            return \floatval($stmt->fetch(PDO::FETCH_OBJ)->size);
        }

        throw new \Exception('Impossible to calculate the database size');
    }
public function getDataBaseSize ( ) { $ stmt = $ this -> connection -> query ( "SELECT sum(data_length) / 1024 / 1024 'size' FROM information_schema.TABLES WHERE table_schema = DATABASE() GROUP BY table_schema" ) ; if ( $ stmt -> rowCount ( ) ) { return \ floatval ( $ stmt -> fetch ( PDO :: FETCH_OBJ ) -> size ) ; } throw new \ Exception ( 'Impossible to calculate the database size' ) ; }
Returns the database size in Mo
@return float
@throws \Exception
Returns the database size in Mo