|
PHP5中文手册
mysqli_num_rowsresult->num_rows(No version information available, might be only in CVS) result->num_rows — Gets the number of rows in a result 说明Procedural style:
int mysqli_num_rows
( mysqli_result $result
)
Object oriented style (property): mysqli_result
int$num_rows;
Returns the number of rows in the result set. The use of mysqli_num_rows() depends on whether you use buffered or unbuffered result sets. In case you use unbuffered resultsets mysqli_num_rows() will not correct the correct number of rows until all the rows in the result have been retrieved. 参数
返回值Returns number of rows in the result set.
范例Example#1 Object oriented style
<?php Example#2 Procedural style
<?php 上例将输出:
|