ukcat98
-
Posts
2 -
Joined
-
Last visited
Posts posted by ukcat98
-
-
Hi everyone. I haven't posted in months, not since the new forum which looks great, btw.
I need my search query to return results by a search phrase, not just each individual word in a query. Chapter 6 discusses FULLTEXT searches using WHERE...MATCH but my query returns everything instead of just what I want. For example, searching for Bonn Forceps returns all products by Bonn, and all forceps by every doctor.
http://stephensinst.com/products.php
Here is my query:
$q = "SELECT * FROM products, doctors, types, subtypes WHERE doctors.doc_id = products.doc_id AND types.type_id = products.type_id AND subtypes.sub_id = products.sub_id AND MATCH (description) AGAINST ('%$find%') ORDER BY prod ASC";
I added FULLTEXT index to the products, doctors, types, and subtypes tables. Can someone tell me what I'm doing wrong?
Thanks!
Chris
Fulltext Search?
in PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide (3rd Edition)
Posted
Stuart, thank you!!! That's just what I needed. Can you give any insight into the relevance issue, i.e. matching two search terms without being an "exact" match?
Chris