Example #1
0
/*
 * Initialize database module
 * No function should be called before this
 */
db1_con_t* db_unixodbc_init(const str* _url)
{
	db1_con_t *c;
	c = db_do_init(_url, (void*)db_unixodbc_new_connection);
	if(c && db_unixodbc_tquote) CON_TQUOTE(c) = db_unixodbc_tquote;
	return c;
}
Example #2
0
/**
 * Initialize the database module.
 * No function should be called before this
 * \param _url URL used for initialization
 * \return zero on success, negative value on failure
 */
db1_con_t* db_mysql_init(const str* _url)
{
	db1_con_t *c;
	c = db_do_init(_url, (void *)db_mysql_new_connection);
	if(c) CON_TQUOTE(c) = db_mysql_tquote;
	return c;
}