Answer the question
In order to leave comments, you need to log in
What is the best way to link comments to pages?
There is a site with two types of pages, it is planned to add at least two more types on top.
The question is how best to associate comments with a page type.
1. In the comments, add the type column at once and it will contain page|singe|video (for example)
2. In the comments, add the type_id column, Create a comments_relation table with the id and name\tyle columns.
Where the data will be:
1|page
2|singe
3|video
I tend to the second point (normalization, as it were), but still. What is the "correct way" here?
There may be about 10 such types in the future.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question