-
Notifications
You must be signed in to change notification settings - Fork 10
chl_mysql_db
it4e edited this page Feb 27, 2017
·
2 revisions
<chl/mysql.h>
chl_mysql_db, CHL MySQL database
void chl_mysql_db(char * database);
The chl_mysql_db function is used to select a MySQL database to be used.
- database: the database to be used.
No return value.
main.c
#include <chl/chl.h>
#include <chl/mysql.h>
int main() {
chl_set_default_headers();
chl_print_headers();
// Connect to MySQL server, leave database as NULL
chl_mysql_connect("localhost", "user", "pass", NULL);
// We select the database here instead
chl_mysql_db("database");
chl_mysql_close();
return 0;
}