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

mysqli_stmt::$num_rows

mysqli_stmt::num_rows

mysqli_stmt_num_rows

(PHP 5, PHP 7, PHP 8)

mysqli_stmt::$num_rows -- mysqli_stmt::num_rows -- mysqli_stmt_num_rowsReturns the number of rows fetched from the server

說(shuō)明

面向對象風(fēng)格

public mysqli_stmt::num_rows(): int|string

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

mysqli_stmt_num_rows(mysqli_stmt $statement): int|string

Returns the number of rows buffered in the statement. This function will only work after mysqli_stmt_store_result() is called to buffer the entire result set in the statement handle.

This function returns 0 unless all rows have been fetched from the server.

參數

statement

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

返回值

An int representing the number of buffered rows. Returns 0 in unbuffered mode unless all rows have been fetched from the server.

注意:

If the number of rows is greater than PHP_INT_MAX, the number will be returned as a string.

范例

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

<?php

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

$query "SELECT Name, CountryCode FROM City ORDER BY Name LIMIT 20";
$stmt $mysqli->prepare($query);
$stmt->execute();

/* store the result in an internal buffer */
$stmt->store_result();

printf("Number of rows: %d.\n"$stmt->num_rows);

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

<?php

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

$query "SELECT Name, CountryCode FROM City ORDER BY Name LIMIT 20";
$stmt mysqli_prepare($link$query);
mysqli_stmt_execute($stmt);

/* store the result in an internal buffer */
mysqli_stmt_store_result($stmt);

printf("Number of rows: %d.\n"mysqli_stmt_num_rows($stmt));

以上例程會(huì )輸出:

Number of rows: 20.

參見(jiàn)

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