fix client install comunication
This commit is contained in:
@@ -52,3 +52,14 @@ void msql_acces::write_remove(std::string package){
|
||||
pstmt->setString(1,package);
|
||||
pstmt->executeUpdate();
|
||||
}
|
||||
|
||||
bool msql_acces::get_package_exists(std::string package){
|
||||
sql::PreparedStatement *pstmt = con->prepareStatement("select count(id) from packages where name=?");
|
||||
pstmt->setString(1,package);
|
||||
sql::ResultSet *res = pstmt->executeQuery();
|
||||
int ret=0;
|
||||
while(res->next())
|
||||
ret = res->getInt(1);
|
||||
|
||||
return ret>0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user