0
I have the table "news"and I will make a system of tags, these tags will have to have a table for each or just a table ?
0
I have the table "news"and I will make a system of tags, these tags will have to have a table for each or just a table ?
1
You don’t need a table for each TAG, you create only another table with the tags and the news id as an example below. Another way is to create a column within the news table where you can put tags separated by comma!
Noticia | Tag --------- | ------ Id | Id Desc | IdNoticia | Tag
Browser other questions tagged mysql query foreign-key
You are not signed in. Login or sign up in order to post.
I had thought to put this one way too, but the tags will be registered.
– Caymmi
Who will register the tags?
– mcamara
I will register myself.
– Caymmi
Then you can do the following, create a TAG-only table! So if you need to link the tags to the news you can have an extra table to join the two information, like Noticiatag, Idnoticia and Idtag, managed to understand?
– mcamara
yes intendi, so it’s better, thank you.
– Caymmi