Thread: MySQL help
View Single Post
  #1 (permalink)  
Old 19-10-06, 09:00 AM
Jay's Avatar
Jay Jay is offline
Giggety Giggety
 

Join Date: Nov 2001
Location: Wakefield, West Yorkshire
Posts: 5,177
Thanks: 5
Thanked 90 Times in 22 Posts
Jay is never out of the waterJay is never out of the waterJay is never out of the waterJay is never out of the waterJay is never out of the waterJay is never out of the waterJay is never out of the waterJay is never out of the waterJay is never out of the waterJay is never out of the waterJay is never out of the water
MySQL help

I need a little help from all you MySQL gurus out there. I am setting up (yet another) web project and want to use fulltext searching for my form search. The statement I am using is as follows:

Code:
SELECT name,description,manufacturer,retailer,parent,department,link,imageThumb,imageLarge,price, MATCH(name) AGAINST ('$searchKeyword') AS RANK FROM stock ORDER BY RANK DESC LIMIT $searchLimit;
where $searchKeyword and $searchLimit are variables passed through the function that calls the search.

HOWEVER, I only want to return items that score more than 0 on rank (search weighting) as other results are non applicable. HOw do I use FULLTEXT to return only those results?

One option I thought of was to explode the keyphrase and add '+' onto the front of each keyword in the keyphrase and then searching in BOOLEAN mode but surely there must be a simpler answer.
__________________
Old divers never die - they just go down on old wrecks.

Jay

SAVE MONEY THIS CHRISTMAS
- SIGN UP FOR FREE ONLINE DISCOUNT VOUCHERS - COMPARE MOBILE PHONE TARIFFS


________________________________________


Reply With Quote