msqlFetchField(3)

NAME
msqlFetchField - Get field information about query result

SYNOPSYS
#include <msql.h>

m_field *msqlFetchField(m_result *result);

DESCRIPTION
Along with the actual data rows, the server returns information about the data fields selected. This information is made available to the calling program via the msqlFetchField() function. Like msqlFetchRow(3), this function returns one element of information at a time and returns NULL when no further information is available. The data is returned in a m_field structure which is defined in <msql.h> as follows:
    typedef struct field_s {
    	char	*name,	/* name of field */
    		*table;	/* name of table */
    	int	type,	/* data type of field */
    		length,	/* length in bytes of field */
    		flags;	/* attribute flags */
    } m_field;
Possible values for the type field are also defined in <msql.h> as INT_TYPE, CHAR_TYPE and REAL_TYPE. The individual attribute flags can be accessed using the following macros:
    IS_PRI_KEY(flags)	/* Field is the primary key */
    IS_NOT_NULL(flags)	/* Field may not contain a NULL value */

RETURN VALUE
On success a pointer to an m_field structure is returned and a NULL pointer if no further data is available.

SEE ALSO
msqlQuery(3), msqlStoreResult(3), msqlFetchRow(3), msqlFetchField(3), msql(5).