I am currently working on a custom cms where user can assign multiple categories into single post. My questions are:
- What is the correct mysql table schema for this?
- How do you store the multiple selected categories in the blog post table?
Please let me know if you have clarification.
What you have here is a many to many relationship. The standard method of storing the relationships would be to use a join table for categories and posts. That table will only have category ids and post ids.
The post table will have no information regarding categories itself.