What it sounds like you're doing is developing a relevance algorithm. An article about horses will probably have "horse" in it many times, while a story by Clancy might refer to a "one-horse town". The first is more relevant.
You can do a lot of things with mysql functions, but I'm not aware that there is a function that will COUNT( number of occurence of a word)
You might try:
(for the phrase three dog night)
SELECT
ID,
(IF(TextField IN 'three',1,0)+
IF(TextField IN 'dog',1,0)+
IF(TextField IN 'night',1,0)
) AS Relevance
from Table
..
order by Relevance DESC
"three dog night" will produce a value of 3,
"dog night", "three dog", and "three night" will produce a value of 2,
any ONE of the three will produce a value of 1
3 would be equivalent to the AND condition, 1 or 2 would be equivalent to the OR condition :-)
This is a very crude relevance algorith but it lets the database do all the work. There's a lot of tradeoffs to consider here of course in performance.