msqlNumRows(3)

NAME
msqlNumFields - Return number of fields in a result table

SYNOPSYS
#include <msql.h>

int msqlNumFields(m_result *result);

DESCRIPTION
The number of fielsd returned by a query can be ascertained by calling msqlNumFields() and passing it the result handle returned by msqlStoreResult(3). The value returned by msqlNumFields() indicates the number of elements in the data vector returned by msqlFetchRow(3). It is wise to check the number of fields returned before, as with all arrays, accessing an element that is beyond the end of the data vector can result in a segmentation fault.

RETURN VALUE
The number of fields in result.

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