5

Mysql++

view full story
linux-howto

http://www.unix.com – code: #include <mysql/mysql.h> #include <my_global.h> int main(int argc, char **argv) { MYSQL *conn; conn = mysql_init(NULL); mysql_real_connect(conn, "localhost", "zetcode", "passwd", "testdb", 0, NULL, 0); mysql_query(conn, "use vobd_db"); mysql_query(conn, "select * from obd_call_status limit 10"); result = mysql_store_result(conn); mysql_close(conn); } output : mysql.c:2:23: error: my_global.h: No such file or directory mysql.c: In function âint main(int, char**)â: mysql.c:8: (HowTos)