> I have a form containing a text field where the user types in a
sentence.
> I
> need to search a mysql table, specifically a text field and display a
list
> of found results.  My criteria selections are:
> 
> 1) return a record if all the words are contained in a record
> 2) return a record if all any word entered are contained in a record
> 3) return a record if parts of all words (starting at the beginning)
are
> contained in a record (e.g.. 'ex is in 'exercise')
> 3) return a record if parts of any word (starting at the beginning)
are
> contained in a record (e.g.. 'ex is in 'exercise')

I don't quite understand your logic. It seems like a lot of trash rows
would be returned, anyway... your best bet would be to look into the
FULLTEXT indexing in mysql and go from there.

<watch wrap>
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html
#Fulltext_Search
</watch wrap>

---John Holmes...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to