From 43af8d48ca0d2ec219a7641d5555fe4c2479b047 Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期二, 10 一月 2017 09:32:54 +0800
Subject: [PATCH] commit for add new file
---
RtspFace/demo/src/db/DBuntil.h | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/RtspFace/demo/src/db/DBuntil.h b/RtspFace/demo/src/db/DBuntil.h
index f3ac9df..337b371 100644
--- a/RtspFace/demo/src/db/DBuntil.h
+++ b/RtspFace/demo/src/db/DBuntil.h
@@ -1,11 +1,19 @@
#ifndef _DBUNTIL_H_
#define _DBUNTIL_H_
-struct person
-{
+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
@@ -13,24 +21,20 @@
public:
DBuntil();
+ DBuntil(my_db mydb);
~DBuntil();
person db_rearch(int f_id);
- int db_register(int f_id,person p);
+ bool db_register(int f_id,person *p);
private:
- int db_add();
+ bool db_add(int f_id,person *per);
int db_update();
- int db_select(int f_id,person *per);
+ bool 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;
};
--
Gitblit v1.8.0