In message <[EMAIL PROTECTED]>, Jer <[EMAIL PROTECTED]> writes
>
>
>Currently, I use LIKE in the query (i.e. WHERE title LIKE '$search').
>I'm finding that that is too restrictive.
>
>For example, if someone were to search for the title "Me, Myself &
>Irene", they would actually need to search for "me, myself & irene".
>If they search for "me myself irene" or "me irene" or "me, myself and
>irene", the search would come back with nothing.
>
>Is there a better way to search than using LIKE in the query?

$search = '%' . $search . '%';

Now you can 
SEARCH... WHERE title LIKE '$search';

-- 
Pete Clark

http://www.hotcosta.com
http://www.spanishholidaybookings.com




Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to