You are here : Cmysql/mysql.hmysql_create_db

mysql_create_db() - mysql/mysql.h

 Creates the database named by the db
        parameter.dbThis function is deprecated. It is preferable to use
        mysql_query() to issue an SQL
        CREATE DATABASE statement
        instead.mysql_query()mysql_query()CREATE DATABASECREATE DATABASE


Syntax

int mysql_create_db(MYSQL *mysql, const char
        *db)


Example

if(mysql_create_db(&mysql, "my_database"))
{
   fprintf(stderr, "Failed to create new database.  Error: %s\n",
           mysql_error(&mysql));
}


Output / Return Value

 Zero for success. Nonzero if an error occurred.


Limitations


Alternatives / See Also


Reference