Micro optimization I know, this is more because I am curious.
I have two link tables,
blog_categories_posts => post_id, category_id
blog_tags_posts => post_id, tag_id
I am removing all links from both tables based on the post_id
:
DELETE FROM blog_categories_posts WHERE post_id = {$id};
DELETE FROM blog_tags_posts WHERE post_id = {$id};
Anyway, I am wondering if it is possible to delete from both tables at once, and whether it would be a performance (whilst micro) hit or gain?
I imagine if it was to work:
DELETE FROM blog_categories_posts, blog_tags_posts where post_id = {$id}
or a similar syntax?