By Shiloh's description, I think you want to replace AND with OR -
using AND will only return rows that contains every word, while using
OR will match any row that has any of them.

On Wed, 30 Jun 2004 23:22:04 -0400, John W. Holmes
> For that simple example, you can just explode the string on the space and
> create a WHERE clause entry for each word.
> For example:
> $words = explode(' ',$_GET['search_text']);
> foreach($words as $word)
> { $query .= " AND column LIKE '%$word%' "; }

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to