| | |
| | | return p;
|
| | | }
|
| | |
|
| | | int DBuntil::db_select(int f_id,person* per)
|
| | | bool DBuntil::db_select(int f_id,person* per)
|
| | | {
|
| | |
|
| | | sprintf( sql, "select a.p_id,b.`name`,b.img from face_person a,user_info b where a.face_id = %d AND a.p_id = b.pid " , f_id );
|
| | |
| | | return true;
|
| | | }
|
| | |
|
| | | int DBuntil::db_add(int f_id,person *per)
|
| | | bool DBuntil::db_add(int f_id,person *per)
|
| | | {
|
| | | //
|
| | | sprintf( sql, "INSERT INTO user_info(NAME, img) VALUES('%s', NULL)" , per->name );
|
| | |
| | | return false;
|
| | | }
|
| | |
|
| | | int DBuntil::db_register(int f_id,person *per)
|
| | | bool DBuntil::db_register(int f_id,person *per)
|
| | | {
|
| | | if(db_add(f_id,per)){
|
| | | return true;
|