insert into mysql c++ code example
Example: insert into mysql c++
#include
#include
#include
#include
using namespace std;
MYSQL *conn, mysql;
MYSQL_RES *res;
MYSQL_ROW row;
int query_state;
int main()
{
const char *server="students";
const char *user="*****";
const char *password="********";
const char *database="*****";
mysql_init(&mysql);
conn=mysql_real_connect(&mysql, server, user, password, database, 0, 0, 0);
if(conn==NULL)
{
cout<>instnum;
cout<>insttype;
cout<>maker;
cout<>year;
cout<