Session::createSchema
(No version information available, might only be in Git)
Session::createSchema — Create new schema
Description
Creates a new schema.
Parameters
schema_name
Name of the schema to create.
Return Values
A Schema object on success, and emits an exception on failure.
Examples
Example #1 mysql_xdevapi\Session::createSchema() example
<?php
$uri = 'mysqlx://happyuser:password@127.0.0.1:33060/';
$sess = mysql_xdevapi\getSession($uri);
try {
if ($schema = $sess->createSchema('fruit')) {
echo "Info: I created a schema named 'fruit'\n";
}
} catch (Exception $e) {
echo $e->getMessage();
}
?>The above example will output something similar to:
Info: I created a schema named 'fruit'
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
