(PHP 5)
mysqli->protocol_version -- mysqli_get_proto_info — 使用している MySQL プロトコルのバージョンを返す
オブジェクト指向型(プロパティ):
手続き型:
link で表される接続で使用している MySQL プロトコルのバージョンを整数値で返します。
プロトコルバージョンを整数値で返します。
例1 オブジェクト指向型
<?php
$mysqli = new mysqli("localhost", "my_user", "my_password");
/* 接続状況をチェックします */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
/* プロトコルのバージョンを表示します */
printf("Protocol version: %d\n", $mysqli->protocol_version);
/* 接続を閉じます */
$mysqli->close();
?>
例2 手続き型
<?php
$link = mysqli_connect("localhost", "my_user", "my_password");
/* 接続状況をチェックします */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
/* プロトコルのバージョンを表示します */
printf("Protocol version: %d\n", mysqli_get_proto_info($link));
/* 接続を閉じます */
mysqli_close($link);
?>
上の例の出力は以下となります。
Protocol version: 10
NPO法人の設立(東京・大阪) 東京や大阪などNPO法人を設立する場合の注意点等を紹介
不動産・賃貸・マンション 不動産・賃貸・マンションに関する用語集です。
堺市の入院・内科大阪の賃貸探し 大阪で賃貸を探している方は大阪ホームへ
東京の賃貸マンション 東京で賃貸を探すなら東京賃貸.orgへ