After rebuilding my app again a bug caused my forum to have a - post

I have zero idea how to delete this or fix this besides deleting the category which I don’t know how to do in the database.

If I am understanding the screenshot correctly, it is showing the replies count for a topic on your site to be -1. Do you know if any replies to the topic have been deleted?

The topic doesn’t exist. Like when clicked on it just bugs and says this topic doesn’t exist and it shows the topic id as 40/1 and I just don’t know how to delete it i tried the method of removing using the database but it doesn’t work and i can’t delete the category to remove the post.

Is there a way in the database I could remove the category without deleting all post.