MySQL search / random row

Hopefully i can explain this well enough!..I want to search a MySQL table for certain keywords, cool no problem i can do that..However.. I want to return just 1 random row based upon a good match of these keywords. What would be the best way to do this if i had a table with thousands of rows and keep everything super fast.First to mind would be to return an array of 10 random rows loop over them and check for keywords in PHP and get this run over till a good match has been found then stop.. so if in them first 10 a match wasn't found it will query the database again..Any help is most appreciated!
 
Back
Top