?? cmysql.h
字號:
// Mysql.h: interface for the CMysql class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_MYSQL_H__73EA24DC_E67B_4C03_B2BC_8B096CE47E7B__INCLUDED_)
#define AFX_MYSQL_H__73EA24DC_E67B_4C03_B2BC_8B096CE47E7B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "stdafx.h"
#include "winsock.h"
#include <stdlib.h>
#include <string.h>
#include "stdio.h"
#include "mysql.h"
#include <stdio.h>
//#include "string.h"
#include <malloc.h>
class CMysql
{
public:
MYSQL_ROW row;
public:
CMysql();
virtual ~CMysql();
char * str_link(char *a,char *b);
int connect(char *host, char *user, char *password,char *db_name);
int query(const char *query);
int get_next_row();
protected:
MYSQL mysql;
MYSQL_RES *result;
};
#endif // !defined(AFX_MYSQL_H__73EA24DC_E67B_4C03_B2BC_8B096CE47E7B__INCLUDED_)
/*
/*
num_fields=mysql_num_fields(result);
while(row=mysql_fetch_row(result))
{
lengths=mysql_fetch_lengths(result);
for(i=0;i<num_fields;i++)
{
printf("The length is:%d\n",lengths[i]);
printf("The content is:%s\n",row[i]?row[i]:"NULL");
}
y=lengths[1];
printf("\n");
}
// x=&y;
// *a=*a**x;
*c=*a**b; ENTER YOUR CODE HERE
return 1;
}
*/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -