#include <stdio.h>
#include <stdlib.h>
#include <syslog.h>
#include "mysql.h"
int main(int argc, char * argv[])
{
MYSQL my_connection;
MYSQL_RES * my_res;
MYSQL_ROW row;
MYSQL_FIELD * fields;
char str[30];
int res;
int i;
mysql_init(&my_connection);
if (mysql_real_connect(&my_connection, "192.168.1.30", "root", "mysql", "sun", 0, NULL, 0))
{
printf("connect succeed!\n");
/*
res = mysql_query(&my_connection, "insert into buddy(user_id, f......
阅读全文