Home > Backend Development > PHP Tutorial > Requirement: How to find users with similar tags to yourself

Requirement: How to find users with similar tags to yourself

WBOY
Release: 2016-09-05 08:44:48
Original
1039 people have browsed it

Now we are going to make a "guess what you like function". The rules are as follows:
Find people with similar tags to yourself.
The tag field in the database is like this. The tag id is stored, separated by commas (1,2,3 ,4):
Assume that I am 1, 5:
Then I need to find out the labels 1 - 5 -1, 5 -1, 6 -2, 5, 8 (- is the separator)

What if I write a sql statement?

The database is mysql

Requirement: How to find users with similar tags to yourself

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template