Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP mysqli_num_fields() Function

PHP mysqli_num_fields() Function

PHP MySQLi Reference Manual PHP MySQLi Reference Manual

Return the number of fields (columns) in a result set:




Definition and Usage

The mysqli_num_fields() function returns the number of fields (columns) in a result set.


Syntax

mysqli_num_fields(

result

)

;

Parameters Description
result Required. Specifies the result set identifier returned by mysqli_query(), mysqli_store_result(), or mysqli_use_result().

Technical Details

Return Value: Returns the number of fields in the result set.
PHP Version: 5+

PHP MySQLi Reference Manual PHP MySQLi Reference Manual