Esempio n. 1
0
string FacilityService::SelectSignle(string id) {
    string sql = "select * from facility where facility_id="
                 + Utils::AddSingleQuoteMark(id);
    DBConn db;
    string res = db.Query_single_mysql(sql);
    return res;
}
Esempio n. 2
0
string UserService::SelectSignle(string u_id){
	DBConn db;
	string sql=SELECT_SINGLE_USER_SQL+Utils::AddSingleQuoteMark(u_id);
	string res=db.Query_single_mysql(sql);
	db.Close_mysql();
	return res;
}
Esempio n. 3
0
/*按id查询单个管理员*/
string AdminService::selectSingleAdmin(string a_id){
cout<<"AdminService::slelectSingleAdmin  ---------i'm here"<<endl;
	DBConn db;
	string sql = SELECT_SINGLE_ADMIN_SQL+Utils::AddSingleQuoteMark(a_id);
cout<<"select single sql= "<<sql<<endl;
	string res = db.Query_single_mysql(sql);
cout<<"AdminService::selectSingleAdmin(), res="<<res<<endl;
	db.Close_mysql();
	return res;
}
Esempio n. 4
0
/*按id查询管理员权限*/
string AdminService::GetAdminPriority(string a_id){
	Json::Value value;
	Json::Reader reader;
	string reVal;
	DBConn db;
	string sql = "select a_priority from admin where a_id='"+a_id+"'";
cout<<"AdminService::GetAdminPriority-----sql="<<sql<<endl;
	if (reader.parse(db.Query_single_mysql(sql),value)) {
		reVal = value["a_priority"].asString();
	}
cout<<"AdminService::GetAdminPriority-----res="<<reVal<<endl;
    return reVal;
}