diff --git a/SupportBoi/Database.cs b/SupportBoi/Database.cs index dad77ba..74759a6 100644 --- a/SupportBoi/Database.cs +++ b/SupportBoi/Database.cs @@ -312,8 +312,9 @@ public static void ArchiveTicket(Ticket ticket) { using (MySqlConnection c = GetConnection()) { - MySqlCommand deleteTicket = new MySqlCommand(@"DELETE FROM ticket_history WHERE id=@id", c); + MySqlCommand deleteTicket = new MySqlCommand(@"DELETE FROM ticket_history WHERE id=@id OR channel_id=@channel_id", c); deleteTicket.Parameters.AddWithValue("@id", ticket.id); + deleteTicket.Parameters.AddWithValue("@channel_id", ticket.channelID); c.Open(); deleteTicket.Prepare();