资 源 简 介
Overview
Many existing languages and frameworks (including PHP, Python and Ruby) interact with MySQL via the MySQL Connector/C a.k.a. libmysqlclient API using the familiar mysql_real_connect, mysql_real_query, mysql_store_results methods.
Using the various libraries in this project, these applications can now use a MySQL Connector/C "wrapper" that then delegates to the ODBC API. This means that any MySQL Connector/C application can now run against ODBC data sources that use MySQL Connector/ODBC.
Code Example
To connect to an ODBC data source using this driver, the database name must begin with "odbc:" followed by the DSN name. For example:
MYSQL mysql;mysql_server_init(&mysql);mysql_real_connect(&mysql, "hostIgnored", "user", "passwd", "odbc:mydsn", 0, NULL, 0);
This will translate to a call to ODBC"s SQLDriverConnect method. Subsequent MySQL API c