mysql_field_name

string mysql_field_name(mysql result result_handle, int field_offset) 
result_handle Result handle returned by mysql_db_query() or mysql_query()
field_offset Field offset to use

Gets the name of the specified field in a result set.

Returns:

String; FALSE on error

Description:

mysql_field_name() fetches the name of a specified field in a result set. The field_offset argument specifies the desired field. The field offset starts at 0.

If the field’s value is generated by an expression, the expression is used as the name. For example, suppose this is the query:

SELECT count(user); 

The name property would be count(user).

If an alias is used for the column (or an expression), the alias is used as the name. For all other cases, ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.