Hi Pete,

On Jun 27, 2005, at 2:41 PM, Pete wrote:

>
> Then it won't be as slow - but try to lose the LIKE.
>
>
>> Mike
>>
>
> --  
> Pete Clark
>
> http://www.hotcosta.com
> http://www.spanishholidaybookings.com
>

Thank you for dissecting that query. I'm creating a search page for a  
chamber of commerce, so users can search for members. I understand  
that using '="fred"' would be faster than 'LIKE '%fred%', but users  
may be doing searches for partial city names or part of company name.  
Is this a bad usage of LIKE? Would '="%fred%"' or '="%b%"' find the  
same thing as using LIKE? If you had to do a partial search and could  
not train users to use wild cards or give them options of =, != or  
LIKE. It has to be a catch all search. Would using 'REGEXP' be better?

Sincerely,
Mike
-- 
Mike Brandonisio                 *    IT Planning & Support
Tech One Illustration            *    Database Applications
tel (630) 759-9283               *    e-Commerce
[EMAIL PROTECTED]  *    www.techoneillustration.com


The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

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

<*> 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