Home > Quick Reference Library > mysql_num_fields
mysql_num_fields
(PHP 3, PHP 4 )
mysql_num_fields -- Get number of fields in result
Description
int mysql_num_fields ( resource result)
mysql_num_fields() returns the number of fields in the result set result.
The database parameter is the name of the database to retrieve the list of tables from. Upon failure, mysql_list_tables() returns FALSE.
For downward compatibility mysql_numfields() can be used. This is deprecated however.
See also mysql_select_db(), mysql_query(), mysql_fetch_field(), and mysql_num_rows().
