i'm trying to do a search engine for a briefing system.
I'm using a many to many relationship style setup with 3 databases representing the relationships.
comms_briefings is where the data is stored for the briefings search_tags is where the tags are stored briefings_tags is where the relationship is formed
i have this code already which ALMOST perfect however, for some reason it returns the same row in the database multiple times if a tag appears more than once in the briefing.
eg if user searchs for
$ "complx enquiries"
the system will return any row that has the tag complx and enquiries twice as there are two matching tags. I want the results to be ordered desc with the row that gets the most results first and only to appear once.
any ideas? :)