You are here : Cmysql/mysql.hmysql_list_dbs

mysql_list_dbs() - mysql/mysql.h

 Returns a result set consisting of database names on the server
        that match the simple regular expression specified by the
        wild parameter. wild may
        contain the wildcard characters % or
        _, or may be a NULL
        pointer to match all databases. Calling
        mysql_list_dbs() is similar to
        executing the query SHOW DATABASES [LIKE
        wild].wildwild%_NULLmysql_list_dbs()mysql_list_dbs()SHOW DATABASES [LIKE
        wild]wildwildYou must free the result set with
        mysql_free_result().mysql_free_result()mysql_free_result()


Syntax

MYSQL_RES *mysql_list_dbs(MYSQL *mysql, const char
        *wild)


Example

 


Output / Return Value

 A MYSQL_RES result set for success.
        NULL if an error occurred.MYSQL_RESNULL


Limitations


Alternatives / See Also


Reference