Answer the question
In order to leave comments, you need to log in
How to store a list of categories in mysql?
There is news, she has a list of static categories to which she belongs. How to store this list of categories in the database? Table in the form: categoryName1:true, categoryName2:false
and so on? Or is there another option?
Answer the question
In order to leave comments, you need to log in
category tree table: ID;categoryName;parentCategoryID
news table: ID;text;timestamp;author
link table: ID;categoryID;articleID
Since @xmoonlight answered above
I can add that this type of relationship is called many-to-many
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question