I have 3 tables: categories, posts and comments.
categories and posts are connected via categories.id_category = posts.category_id and posts and comments are connected via posts.id_post = comments.post_id.
When I delete category, I want also to delete all the posts related to that category and all comments related to that posts. Can this be done in one query?