>
> On Wed, 13 Jan 1999, Gilles Darold wrote:
>
> > Hi Kevin,
> >
> > You can also use regexp expression like this :
> >
> > SELECT * FROM photos WHERE keywords ~* '.*$cat_name.*';
> >
> > it works fine.
>
>
> Thanks for the tip. Any recommendations as to which would be faster when
> searching about 2,000 records or so..
>
> WHERE keywords ~* '.*$cat_name.*';
>
> or
>
> WHERE lower(keywords) LIKE lower('%$cat_name%')
Well, you could (1) omit the second "lower()" function
(like '%cat_name%' is already in lower case!) (2) insure that your
table already contains nothing but lower-case (or upper-case) entries,
if appropriate.
- Tim