Session::createSchema

(No version information available, might only be in Git)

Session::createSchema โ€” Create new schema

่ฏดๆ˜Ž

public mysql_xdevapi\Session::createSchema(string $schema_name): mysql_xdevapi\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'
๏ผ‹ๆทปๅŠ ๅค‡ๆณจ

็”จๆˆท่ดก็Œฎ็š„ๅค‡ๆณจ

ๆญค้กต้ขๅฐšๆ— ็”จๆˆท่ดก็Œฎ็š„ๅค‡ๆณจใ€‚
To Top