I’m building a kinda search engine thing.
My query breaks apart a query string and then SELECTs for each word from the string all of the reference ids associated with that word.
I have a method of giving a relevance score to each id for each query word. However I am looking for a way of keeping track if my query returns the id multiple times. Could anyone point me in the right directions. I am using PHP and mySQL??
Well, you could use PHP or SQL to achieve this:
a code example (no error checking, assuming you’re using mysql api directly – which you shouldn’t):
using SQL you could try a HAVING statement, like so:
Since I don’t know your table layout it’s hard to write actually working code/SQL.