I have an input box where multiple words can be entered and searched for in my table.
supposing the user enters 'people places things' as their search criteria, these should get submitted to my php function which searches through my 'nouns' table and the 'description' and 'title' fields for possible matches. The function should then sort the results in descending order by number of matches found.
what I've got so far (missing a lot, and possibly not even the correct method):
$lcSearchVal = "people places things";
$lcSearchVal = explode( ' ', $lcSearchVal );
foreach( $lcSearchVal as $lcSearchWord ){
$qry_suggest = mysql_query( 'SELECT * FROM nouns
WHERE Active
AND ( ' . strpos($lcSearchWord, "description") > 0 . '
OR ' . strpos($lcSearchWord, "title") > 0 . ' ) '
);
}
I'm not sure what to do or where to go from here though....please help!