2008-07-15 10:45:32大D QQ

mysql connect in c

mysql_options()

int mysql_options(MYSQL *mysql, enum mysql_option option, const char *arg)

Description
mysql_options() should be called after mysql_init() and before mysql_connect() or mysql_real_connect().

example:

mysql_init(&mysql);
mysql_options(&mysql, MYSQL_OPT_RECONNECT, "1");
mysql_real_connect("xxxxxxxxxx");