Oracle 5.0 Reference Manual page 2173

Table of Contents

Advertisement

Return Values
The
MYSQL_FIELD
Errors
None.
Example
MYSQL_FIELD *field;
while((field = mysql_fetch_field(result)))
{
printf("field name %s\n", field->name);
}
20.6.6.18.
mysql_fetch_field_direct()
MYSQL_FIELD *mysql_fetch_field_direct(MYSQL_RES *result, unsigned int
fieldnr)
Description
Given a field number
a
MYSQL_FIELD
value for
fieldnr
Return Values
The
MYSQL_FIELD
Errors
None.
Example
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);
}
20.6.6.19.
mysql_fetch_fields()
MYSQL_FIELD *mysql_fetch_fields(MYSQL_RES *result)
Description
Returns an array of all
definition for one column of the result set.
Return Values
An array of
MYSQL_FIELD
Errors
None.
C API Function Descriptions
structure for the current column.
for a column within a result set, returns that column's field definition as
fieldnr
structure. Use this function to retrieve the definition for an arbitrary column. Specify a
in the range from 0 to mysql_num_fields(result)-1.
structure for the specified column.
structures for a result set. Each structure provides the field
MYSQL_FIELD
structures for all columns of a result set.
if no columns are left.
NULL
2153

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents