Welcome Guest, Not a member yet? Register   Sign In
How to create categories and associate them with posts

Hi guys, I'm using the Codeigniter framework, I'm fine. However, I would need help with the creation of categories associated with any hypothetical post. I'm creating a small script where every post has to be associated with a category, but it is not practical to follow the right practices for creating tables in databases.

If anyone can help me, I would be grateful.

In the database I guess I can create these tables and fields:

Post: id, title, description, category
Categories: id, category_name

So, I create categories within "Categories".
Subsequently, each post has the classic id, title, description, and assigned category.

In my home, I show all the results.
While in the category page I get only the results associated with the category.

This is how I think it should be done in words, if anyone can advise me on an article maybe it would be better. Thanks to anyone who will help me!

Messages In This Thread
How to create categories and associate them with posts - by Marcolino92 - 09-15-2017, 10:53 AM

Theme © iAndrew 2016 - Forum software by © MyBB