Ordering items with matching tags by number of tags that match
问题 I'm trying to figure out how to order items with matching tags by the number of tags that match. Let's say you have three MySQL tables: tags(tag_id, title) articles(article_id, some_text) articles_tags(tag_id, article_id) Now let's say you have four articles where: article_id = 1 has tags "humor," "funny," and "hilarious." article_id = 2 has tags "funny," "silly," and "goofy." article_id = 3 has tags "funny," "silly," and "goofy." article_id = 4 has the tag "completely serious." You need to