|
-
February 29th, 2024, 05:07 PM
#1
[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?
-
March 1st, 2024, 07:55 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|