add send info

This commit is contained in:
2020-05-13 00:58:32 +02:00
parent e5078b4969
commit 726d990d20
5 changed files with 30 additions and 3 deletions

View File

@@ -18,3 +18,22 @@ std::string msql_acces::get_passwd(std::string username){
delete res;
return ret;
}
std::list<std::string> msql_acces::get_pinfo(){
sql::PreparedStatement *pstmt = con->prepareStatement("select * from packages");
sql::ResultSet *res = pstmt->executeQuery();
std::list<std::string> ret;
std::string aux;
while(res->next()){
aux="";
aux += res->getString("name");
if(res->getBoolean("uses")){
aux+=":true";
}else{
aux+=":false";
}
aux += ":"+res->getString("created");
}
delete res;
return ret;
}