mysql_fetch_field_direct()
MYSQL_FIELD *mysql_fetch_field_direct(MYSQL_RES *result,
unsigned int field_nbr)This function returns a MYSQL_FIELD
structure that provides information on a given field of a results set
referred to in the first argument of the function. The particular
field is given as the second argument. Here is an example:
...
MYSQL_FIELD *field;
...
mysql_query(mysql, "SELECT * FROM clients LIMIT 1");
result = mysql_store_result(mysql);
field = mysql_fetch_field_direct(result, 0);
printf("%s \n", field->name);
...This function is similar to
mysql_fetch_field() except that information
on just one specified field can be obtained. In the example here, the
name of the first field (0 being the first) will be displayed.