On a page which shows a specific object I need to display related objects for that object based on tags. ´The object with the most matching tags should be at the top. Basically I somhow need to identify how many tags for each object that match the object on the page and display the top results.
My db schema:
Table Object
------------
id
name
Table Tagset
-------------
object_id
tag_id
Table Tag
------------
id
name