Finish remove user implementation

This commit is contained in:
2020-05-26 01:37:34 +02:00
parent 2783e385a4
commit b0c78dde76
7 changed files with 23 additions and 1 deletions

View File

@@ -97,3 +97,10 @@ void msql_acces::create_user(std::string user, std::string pass, bool admin){
pstmt->setBoolean(3,admin);
sql::ResultSet *res = pstmt->executeQuery();
}
void msql_acces::remove_user(std::string user){
sql::PreparedStatement *pstmt =
con->prepareStatement("delete from users where username=?");
pstmt->setString(1,user);
pstmt->executeUpdate();
}