| | |||||||
|
Welcome to the YD Scuba forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact support. |
| Technology: Discuss MySQL help in the Non-Diving Related Forums forums: I need a little help from all you MySQL gurus out there. I am setting up (yet another) web project ... |
| | LinkBack | Thread Tools | Display Modes |
| ||||
| 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;
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 Golf Clubs Direct - Replica Football Shirts - MP3 World - MP3 Revolution - Some of my other ventures! ________________________________________ Future Music Internet Radio is currently http://wms3.global-streaming.net/sc_...ize=88&scid=18 |
| ||||
| Alternatively can't you use the same syntax in the where? i.e. select match(blah) against(blah) as rank where match(blah) against(blah > 0 order by Rank
__________________ “Did I leave the gas on? No! No, I'm a f***in' squirrel!” Mr E Izzard |
| ||||
| Quote:
__________________ Old divers never die - they just go down on old wrecks. Jay Golf Clubs Direct - Replica Football Shirts - MP3 World - MP3 Revolution - Some of my other ventures! ________________________________________ Future Music Internet Radio is currently http://wms3.global-streaming.net/sc_...ize=88&scid=18 |
| ||||
| I can imagine. Although I haven't worked a 17 hour day in year....and if I did, the last thing I'd want to do is look at a Db
__________________ “Did I leave the gas on? No! No, I'm a f***in' squirrel!” Mr E Izzard |
| Thread Tools | |
| Display Modes | |
| |
| | ||