Home >Backend Development >PHP Tutorial >When a post has multiple tags, what is the best way to save it in the database? What should I do when I pick it up?
Pictured:
A post has 3 tags, how to save it in the database?
If the tag ID is saved, for example: 1-2-3
How to check it when querying?
Using like matching does not work!
Pictured:
A post has 3 tags, how to save it in the database?
If the tag ID is saved, for example: 1-2-3
How to check it when querying?
Using like matching does not work!
type = 1,2,3
select * from article where FIND_IN_SET('2',type)
How?