Jump to content
mactron

Categorizing blog posts

Recommended Posts

I'm working on a simple CMS system. So my question is how to add categories of blogs inside database correctly. If I understand EAV I need to add two tables; one table for names, descriptions of categories and one table for categories IDs and posts IDs.

I'm correct?

Cheers

blog_tbl

+------+---------+--------+---------------+-------------------+---------+
| b_id | b_title | b_text | b_seo_title   | b_seo_description | slug    |
+------+---------+--------+---------------+-------------------+---------+
|  1   | Title 1 | txt 1  |  70 charsets  | 170 charsets      | title-1 |
|  2   | Title 2 | txt 2  |  70 charsets  | 170 charsets      | title-2 |
+------+---------+--------+---------------+-------------------+---------+

 

Edited by mactron

Share this post


Link to post
Share on other sites
39 minutes ago, mactron said:

If I understand EAV I need to add two tables; one table for names, descriptions of categories and one table for categories IDs and posts IDs.

Sounds good to me. Assuming you want multiple categories applied to each blog post, that is.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.