Forum Moderators: open
I am trying to figure a way to assign multiple parent_id's to content aritcles, So both query a) and b) will return content record ID 1.
CONTENT
------------
ID ¦ 1
Parent_ID¦ 8,9
------------
a)
SELECT * FROM content where parent_id = 8
b)
SELECT * FROM content where parent_id = 9
Is this possible?
You'll need to introduce a new table to manage that relationship, which will only contain references to the IDs of your categories and articles.
category
------------
category_id
category_name
------------
content
------------
content_id
content_title
content_body
------------
category_content_relationship
------------
category_id
content_id
------------
Now, any category can have a relationship with any content.