CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2024
    Posts
    15

    [RESOLVED] error: Use of undeclared identifier 'mysql_create_db'; did you mean 'mysql_select_db'

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

    highlights like development environment recognizes it, but is not found by compiler

    #include <mysql.h>

    int main(int argc, char *argv[])
    {
    MYSQL* PA;
    mysql_create_db(conn, "mydatabase");


    return 0;
    }

    from the few websites i found mysql_create_db, and said anything about #include, all that is needed is #include <mysql.h>

    why does editor recognize mysql_create_db, but suggest mysql_select_db?
    and how to use mysql_create_db?

  2. #2
    VictorN's Avatar
    VictorN is offline Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,407

    Re: error: Use of undeclared identifier 'mysql_create_db'; did you mean 'mysql_select

    Here is noted that
    mysql_create_db deprecated use mysql_query() to create a database
    However, IMHO you could try the sample code from there
    Victor Nijegorodov

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured