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/main.cpp | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/RtspFace/demo/src/db/main.cpp b/RtspFace/demo/src/db/main.cpp
index fa207b5..a9304df 100644
--- a/RtspFace/demo/src/db/main.cpp
+++ b/RtspFace/demo/src/db/main.cpp
@@ -1,4 +1,3 @@
-
#include <string>
#include <iostream>
@@ -9,9 +8,17 @@
int main(int argc, char *argv[])
{
- int i=i;
- DBuntil dbu = DBuntil();
- person p={};
+ int i=2;
+ my_db mydb={"root","Basic@2017","localhost","demo",3306};
+
+ DBuntil dbu = DBuntil(mydb);
+ person p={0,"test"};
+ if(dbu.db_register(i,&p)){
+ cout<<"add succeed"<<endl;
+ }else
+ cout<<"add false"<<endl;
+ p={};
+
p = dbu.db_rearch(i);
if(p.p_id != NULL)
{
@@ -19,5 +26,6 @@
cout<<p.name<<endl;
}else
cout<<"person is null"<<endl;
+
return 0;
-}
\ No newline at end of file
+}
--
Gitblit v1.8.0