Session::createSchema
(No version information available, might only be in Git)
Session::createSchema — Create new schema
说明
Creates a new schema.
参数
-
schema_name
-
Name of the schema to create.
返回值
A Schema object on success, and emits an exception on failure.
范例
示例 #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();
}
?>
以上例程的输出类似于:
Info: I created a schema named 'fruit'

User Contributed Notes
There are no user contributed notes for this page.
备份地址:http://www.lvesu.com/blog/php/mysql-xdevapi-session.createschema.php