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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
| #ifndef _DBUNTIL_H_
| #define _DBUNTIL_H_
|
| struct person {
| int p_id;
| char *name;
| int f_id;
| //ͼƬ
| };
|
| struct my_db {
| char user[25];
| char pswd[25];
| char host[25];
| char db[25];
| unsigned int port;
| };
|
| class DBuntil
| {
|
| public:
| DBuntil();
| DBuntil(my_db mydb);
| ~DBuntil();
| person db_rearch(int f_id);
|
| bool db_register(int f_id,person *p);
|
| private:
|
| bool db_add(int f_id,person *per);
| int db_update();
| bool db_select(int f_id,person *per);
|
| char sql[1024];
| int res;
| };
|
|
| #endif
|
|