From 0b1de1fddd889cf2ebbe578bfad83862f5ebdf5a Mon Sep 17 00:00:00 2001
From: houxiao <houxiao@454eff88-639b-444f-9e54-f578c98de674>
Date: 星期一, 09 一月 2017 12:11:05 +0800
Subject: [PATCH] add libevent based daemon

---
 RtspFace/demo/src/DBuntil.h |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/RtspFace/demo/src/DBuntil.h b/RtspFace/demo/src/DBuntil.h
index 5b18ce6..c335bb6 100644
--- a/RtspFace/demo/src/DBuntil.h
+++ b/RtspFace/demo/src/DBuntil.h
@@ -1,14 +1,16 @@
 #ifndef _DBUNTIL_H_
 #define _DBUNTIL_H_
-
-struct person {
+#include <mysql.h>
+struct person
+{
 	int p_id;
 	char *name;
 	int f_id;
 	//图片
 };
 
-struct my_db {
+struct my_db
+{
 	char user[25];
 	char pswd[25];
 	char host[25];
@@ -21,21 +23,23 @@
 
 public:
 	DBuntil();
-	DBuntil(my_db mydb);
 	~DBuntil();
-	*person db_rearch(int f_id);
 
-	bool db_register(int f_id,person *p);
-
+	bool db_search(person *p);
+	bool db_register(person *p);
+	bool db_init(my_db mydb);
+	
+	MYSQL myCont;
+	MYSQL_RES *result;
+	MYSQL_ROW sql_row;
 private:
 
-	bool db_add(int f_id,person *per);
+	bool db_add(person *per);
 	int db_update();
-	bool db_select(int f_id,person *per);
-
+	bool db_select(person *per);
 	char sql[1024];
 	int res;
-};
 
+};
 
 #endif
\ No newline at end of file

--
Gitblit v1.8.0