asmith20002
04-14-2009, 07:16 AM
Hi,
I have a query like this :
select * from table where option1 like '%word%' or option2 like '%word%' or option1 like '%word2%' or option2 like '%word2' ...
how can I order the result so that it gives me the rows which have both 'word1' and 'word2' first, then go the rows which only matches one of the words.
Maybe I can say something like fulltext order but the query 'LIKE'.
How can I make that ?
Thanks a lot
I have a query like this :
select * from table where option1 like '%word%' or option2 like '%word%' or option1 like '%word2%' or option2 like '%word2' ...
how can I order the result so that it gives me the rows which have both 'word1' and 'word2' first, then go the rows which only matches one of the words.
Maybe I can say something like fulltext order but the query 'LIKE'.
How can I make that ?
Thanks a lot