var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: mysql in collaboration with c++
I want to insert values to a mysql table from inside a c++ program such as:
can anyone explain me how i can contact my local mysql server (in 'localhost')
// the following is a mysql command
for(int i=0; i++; i<10)
// The following is a mysql command
INSERT INTO MyTable(Counter)
and how do i write the above mysql lines in a c++ syntax ?
Haven't used C++ to conect to a MySQL db yet ...but you could probably try these links for more info:
C connection API: http://dev.mysql.com/doc/mysql/en/my...l_connect.html
Thanks a lot !
an i use the c code and save myself downloading mysql++?
You need to link your program against the mysql client libraries , which provides you a set of API for connecting and quering the database. The steps are really simple.
check out http://dev.mysql.com/doc/mysql/en/MySQL_APIs.html
they are C API's can be very well used in C++ code.