php8.5
Home/ Manual/ mysql_xdevapi / session/ Session::getSchemas

Session::getSchemas

PHP function Edit on GitHub ✎

Get the schemas

Description

mysql_xdevapi\Session::getSchemas(): array

Get schema objects for all schemas available to the session.

Parameters Parameters

Return Values

An array containing objects that represent all of the schemas available to the session.

Examples

mysql_xdevapi\Session::getSchemas() example

php
<?php
$session = mysql_xdevapi\getSession("mysqlx://user:password@localhost");
$schemas  = $session->getSchemas();

print_r($schemas);

The above example will output something similar to:

output
Array
(
    [0] => mysql_xdevapi\Schema Object
        (
            [name] => addressbook
        )
    [1] => mysql_xdevapi\Schema Object
        (
            [name] => information_schema
        )
    ...

Source: reference/mysql_xdevapi/mysql_xdevapi/session/getschemas.xml · from the official PHP manual (php/doc-en)