msqlListDBs(3)

NAME
msqlListDBs - Get a list of existing databases

SYNOPSYS
#include <msql.h>

m_result *msqlListDBs(int sock);

DESCRIPTION
A list of databases known to the mSQL database engine can be obtained via the msqlListDBs() function. A result handle is returned to the calling program that can be used to access the actual database names. The indivudual names are accessed by calling msqlFetchRow(3) passing it the result handle. The m_row data structure returned by each call will contain one field being the name of the one of the available databases. As with all functions that return a result handle, the data associated with the result must be freed when it is no longer required using msqlFreeResult(3). The m_result structure is defined in <msql.h> as follows:
    typedef struct result_s {
            m_data 	*queryData,
                    *cursor;
    	m_fdata	*fieldData,
    		*fieldCursor;
    	int	numRows,
    		numFields;
    } m_result;

RETURN VALUE
A result handle is returned. If it is empty msqlNumRows(3) will return 0.

SEE ALSO
msqlSelectDB(3), msqlStoreResult(3), msqlFreeResult(3), msqlFetchRow(3), msqlNumRows(3).