blob: 4385a6deade58a17569e5faf7b1dc4347e372028 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef __SQL_H__
#define __SQL_H__
#include <map>
#include <mysql.h>
#include <Exceptions.h>
typedef std::map<String, String> AssocArray;
class SQLConnection : public Base {
public:
SQLConnection(String host, String user, String passwd, String db, int port = 3306, String socket = "", unsigned long clags = 0) throw (GeneralException);
~SQLConnection();
void query(String) throw (GeneralException);
int numrows();
int numfields();
AssocArray fetchrow();
private:
MYSQL con;
MYSQL_RES * res;
int nr, nf;
MYSQL_FIELD * fields;
};
#endif
|