Didn't get a response to my last thread so i thought i'd try a simplified version.
Basically what i'm trying to do is order some results based on whether they match some criteria.
The query is of the form
SELECT distinct *, (apple='delicious' AND pear='rotten') as Relevance FROM tblfruit WHERE apple='delicious' OR pear='rotten' ORDER BY Relevance
so if apple='delicious' AND pear='rotten' Relevance would be 1
a typical result set could be
APPLE PEAR Relevance
delicious rotten 1
delicious rotten 1
delicious delicious 0
rotten rotten 0
rotten delicious 0
does this line of reasoning make sense? if not why not?
Help would be appreciated. Cheers,
Rob
Basically what i'm trying to do is order some results based on whether they match some criteria.
The query is of the form
SELECT distinct *, (apple='delicious' AND pear='rotten') as Relevance FROM tblfruit WHERE apple='delicious' OR pear='rotten' ORDER BY Relevance
so if apple='delicious' AND pear='rotten' Relevance would be 1
a typical result set could be
APPLE PEAR Relevance
delicious rotten 1
delicious rotten 1
delicious delicious 0
rotten rotten 0
rotten delicious 0
does this line of reasoning make sense? if not why not?
Help would be appreciated. Cheers,
Rob