Open jordanmcgowan opened 8 years ago
should use @jordanmcgowan code sent to @bbtrapp
//Delete statement
public void DeleteUserCloud(User user, String cloudType)
{
int cloudId = -1;
if (cloudType == "Google Drive")
{
cloudId = 2;
}
else if (cloudType == "One Drive")
{
cloudId = 1;
}
else
{
Console.WriteLine("No valid Cloud Type");
}
string query = "DELETE FROM user_clouds WHERE user_id='" + user.User_id + "' and cloud_id='" + cloudId + "';";
if (this.OpenConnection() == true)
{
MySqlCommand cmd = new MySqlCommand(query, connection);
cmd.ExecuteNonQuery();
this.CloseConnection();
}
}
When clicking delete, the account is removed from the table, but not actually removed. They repopulate upon opening the window again