| | |
| | | #ifndef _DBUNTIL_H_
|
| | | #define _DBUNTIL_H_
|
| | |
|
| | | struct person
|
| | | {
|
| | | struct person {
|
| | | int p_id;
|
| | | char *name;
|
| | | int f_id;
|
| | | //ͼƬ
|
| | | };
|
| | |
|
| | | struct my_db {
|
| | | char user[];
|
| | | char pswd[];
|
| | | char host[];
|
| | | char db[];
|
| | | unsigned int port;
|
| | | }
|
| | |
|
| | | class DBuntil
|
| | | {
|
| | |
|
| | | public:
|
| | | DBuntil();
|
| | | DBuntil(my_db mydb);
|
| | | ~DBuntil();
|
| | | person db_rearch(int f_id);
|
| | |
|
| | |
| | |
|
| | | private:
|
| | |
|
| | | int db_add();
|
| | | int db_add(int f_id,person *per);
|
| | | int db_update();
|
| | | int db_select(int f_id,person *per);
|
| | |
|
| | | char *sql;
|
| | | char sql[1024];
|
| | | int res;
|
| | | static const char user[]; |
| | | static const char pswd[]; |
| | | static const char host[]; |
| | | static const char db[]; |
| | | static unsigned int port;
|
| | | };
|
| | |
|
| | |
|