I am working on a blog website and stuck at this:
If your post can be tagged with several categories your table model is wrong. You need an associative table between the blog post and the categories. Remove
category id from
post table and create a table
post-category with columns
category-id. Then also add indexes on theses two columns to speed up search in both directions (by category or by post).