Ok, through some tweaking to get the actual database parameters and field names correct I got the search working for the most part and displaying the results. However, here's the rest of the puzzle now that I see if work.
If I type in a single word and the single word matches a 'specialties' in the database that is also a single word then it returns a result. However, if the single word search word matches against a sentence in the 'specialties' field then it returns nothing. To clarify, it only returns a result for a single word search IF the item is finds is also a single word. Here's an example:
a search for 'wangers' comes up with a member specializing in 'wangers' as 'wangers' is the only word in his specialties field
If I search for 'bananas' which is mentioned in 5 member profiles in the 'specialties' field but as part of sentences like 'I eat bananas' it returns nothing.
The search should display the results of any member matching the keywords from their 'details' and 'specialties' fields. Is there an adjustment to make to this to do so?
Here's the working query:
$sql = "SELECT DISTINCT p.firstname, p.lastname, p.title, p.comments, p.memberid FROM plateau_pros p INNER JOIN specialties s ON p.memberid = s.memberid WHERE p.comments LIKE '%$keyword%' OR s.specialties LIKE '%$keyword%'";
$results = mysql_query($sql) or die(mysql_error());
You can test this to see what I mean at http://www.plateaupr....com/search.php
The specialites fields, for example, contain these items:
ID MEMBERID SPECIALTIES
3 65 I eat bananas faster than any monkey.
4 66 I eat bananas
5 67 I eat bananas
6 68 eating bananas
7 69 eat bananans
8 70 eat bananas
Searching for 'bananas' returns a fat 0.