Name
mysql_fetch_fields —
Synopsis
MYSQL_FIELD *mysql_fetch_fields(MYSQL_RES * result)
This
function is the same as mysql_fetch_field
, except
that it returns an array of MYSQL_FIELD
structures
containing the information for every field in the result set.
Example
MYSQL_FIELD *field; /* A pointer to a single field */ MYSQL_FIELD *fields; /* A pointer to an array of fields */ /* Retrieve all the field information for the results */ fields = mysql_fetch_fields(results); /* Assign the third field to 'field' */ field = fields[2];
Get Managing & Using MySQL, 2nd Edition 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.