F
F
freshik3122018-10-24 18:12:18
MySQL
freshik312, 2018-10-24 18:12:18

How to implement a tagging system on a website?

I want to add tags to it when creating news on the site. The user who has registered selects the tags that are of interest to him. When news is added and the tags that are set for the news are found in the user's favorites, display the news to him.
How to correctly build mysql tables and make a search query by tags?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Bay, 2018-10-24
@freshik312

Here's the structure I'm using.
post
id | title
tag
id | title
post_tag , where the link is the PK
post_id | tag_id You
can insert tags through Select2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question