男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站

mysqli_stmt::$field_count

mysqli_stmt_field_count

(PHP 5, PHP 7, PHP 8)

mysqli_stmt::$field_count -- mysqli_stmt_field_countReturns the number of columns in the given statement

說(shuō)明

面向對象風(fēng)格

過(guò)程化風(fēng)格

mysqli_stmt_field_count(mysqli_stmt $statement): int

Returns the number of columns in the prepared statement.

參數

statement

僅以過(guò)程化樣式:由 mysqli_stmt_init() 返回的 mysqli_stmt 對象。

返回值

Returns an integer representing the number of columns.

范例

示例 #1 面向對象風(fēng)格

<?php

mysqli_report
(MYSQLI_REPORT_ERROR MYSQLI_REPORT_STRICT);
$mysqli = new mysqli("localhost""my_user""my_password""world");

$code 'FR';

$stmt $mysqli->prepare("SELECT Name FROM Country WHERE Code=?");
$stmt->bind_param('s'$code);
$stmt->execute();
$row $stmt->get_result()->fetch_row();
for (
$i 0$i $stmt->field_count$i++) {
    
printf("Value of column number %d is %s"$i$row[$i]);
}

示例 #2 過(guò)程化風(fēng)格

<?php

mysqli_report
(MYSQLI_REPORT_ERROR MYSQLI_REPORT_STRICT);
$mysqli mysqli_connect("localhost""my_user""my_password""world");

$code 'FR';

$stmt mysqli_prepare($mysqli"SELECT Name FROM Country WHERE Code=?");
mysqli_stmt_bind_param($stmt's'$code);
mysqli_stmt_execute($stmt);
$result mysqli_stmt_get_result($stmt);
$row mysqli_fetch_row($result);
for (
$i 0$i mysqli_stmt_field_count($stmt); $i++) {
    
printf("Value of column number %d is %s"$i$row[$i]);
}

以上例程的輸出類(lèi)似于:

Value of column number 0 is France

參見(jiàn)

男女疯狂一边摸一边做羞羞视频|啊好深好硬快点用力别停动态图|亚洲一区无码中文字幕|特级无码毛片免费视频播放▽|久久狠狠躁免费观看|国内精品久久久久久网站