#include using namespace std;
class MySQL
{
public:
MySQL();
inline BOOL InitSQL(const string&strHost, const string& strUserName, const string& strPwd, const string& strDataBase, const LONG lPort);
BOOL GetSqlInfo(const string& strSql);
BOOL DoSql(const string& strSql);
~MySQL();
private:
MYSQL myConnect;
MYSQL_RES *result;
};
MySQL::MySQL()
{
}
BOOL MySQL::InitSQL(const string&strHost, const string& strUserName, const string& strPwd, const string& strDataBase, const LONG lPort)
{
mysql_init(&myConnect);
if (mysql_real_connect(&myConnect, strHost.c_str(), strUserName.c_str(), strPwd.c_str(), strDataBase.c_str(), lPort, NULL, 0)){
mysql_query(&myConnect, "SET NAMES GBK");
retu