5.4.18 mysql_fetch_field_direct()
MYSQL_FIELD *
mysql_fetch_field_direct(MYSQL_RES *result,
unsigned int fieldnr)
unsigned int num_fields;
unsigned int i;
MYSQL_FIELD *field;
num_fields = mysql_num_fields(result);
for(i = 0; i < num_fields; i++)
{
field = mysql_fetch_field_direct(result, i);
printf("Field %u is %s\n", i, field->name);
}