Initial commit

This commit is contained in:
2026-07-09 11:27:59 +08:00
commit 3f1edda843
126 changed files with 34446 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
#ifndef DatabasesH
#define DatabasesH
#ifdef _WIN32
#include <winsock2.h>
#else
#include "../common/typedef.h"
#endif
#include "mysql.h"
#include<string>
using namespace std;
class Databases
{
public:
Databases();
~Databases();
public:
int InitMysql();
int ConnectDatabases(char *IP, char *user, char *pass ,char *db);
int CallPro(const char *call, char *select, MYSQL_ROW* row=NULL);
int GetFieldData(int i, char *chData);
int Query( char *query );
my_ulonglong GetInsertID();
int FreeResult();
void CloseMysql();
MYSQL_ROW GetRecord();
int GetFieldNum(){ return m_nfieldNum; };
private:
string m_strCall;
string m_strSelect;
string m_srvIP;
string m_userName;
string m_password;
string m_dbName;
int m_nfieldNum;
MYSQL_ROW m_record;
MYSQL_RES *m_result;
MYSQL m_mysql;
};
#endif