array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'mysql-xdevapi-session.createschema.php', 1 => 'Session::createSchema', ), 'up' => array ( 0 => 'class.mysql-xdevapi-session.php', 1 => 'mysql_xdevapi\\Session', ), 'prev' => array ( 0 => 'mysql-xdevapi-session.construct.php', 1 => 'Session::__construct', ), 'next' => array ( 0 => 'mysql-xdevapi-session.dropschema.php', 1 => 'Session::dropSchema', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mysql_xdevapi/mysql_xdevapi/session/createschema.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(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.
Exemplo #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();
}
?>
O exemplo acima produzirá algo semelhante a:
Info: I created a schema named 'fruit'