PHP 日本研討會 2024

Schema::getSession

(沒有可用的版本資訊,可能僅在 Git 中)

Schema::getSession取得 schema session

說明

public mysql_xdevapi\Schema::getSession(): mysql_xdevapi\Session

從 Schema 物件取得新的 Session 物件。

參數

此函數沒有參數。

傳回值

一個 Session 物件。

範例

範例 #1 mysql_xdevapi\Schema::getSession() 範例

<?php
$session
= mysql_xdevapi\getSession("mysqlx://user:password@localhost");
$session->sql("DROP DATABASE IF EXISTS addressbook")->execute();
$session->sql("CREATE DATABASE addressbook")->execute();

$schema = $session->getSchema("addressbook");

// ...

$newsession = $schema->getSession();

var_dump($session);
var_dump($newsession);
?>

以上範例將輸出類似於以下的內容

object(mysql_xdevapi\Session)#1 (0) {
}

object(mysql_xdevapi\Session)#3 (0) {
}
新增註解

使用者貢獻的註解

此頁面尚無使用者貢獻的註解。
To Top