CakeFest 2024: The Official CakePHP Conference

Session::listClients

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

Session::listClientsクライアントの一覧を取得する

説明

public mysql_xdevapi\Session::listClients(): array

MySQL サーバーのセッションに紐付いたクライアント接続の一覧を取得します。

パラメータ

この関数にはパラメータはありません。

戻り値

現在接続しているクライアントを含んだ配列を返します。 配列の要素には、"client_id", "user", "host", および "sql_session" が含まれています。

例1 mysql_xdevapi\Session::listClients() の例

<?php
$session
= mysql_xdevapi\getSession("mysqlx://user:password@localhost");

$ids = $session->listClients();

var_dump($ids);
?>

上の例の出力は、 たとえば以下のようになります。

array(1) {
  [0]=>
  array(4) {
    ["client_id"]=>
    int(61)
    ["user"]=>
    string(4) "root"
    ["host"]=>
    string(9) "localhost"
    ["sql_session"]=>
    int(72)
  }
}
add a note

User Contributed Notes 1 note

up
0
shaun at shaunfreeman dot co dot uk
4 years ago
As of Version 8.0.17 the Session::listClients() method has not been implemented yet.
To Top