Re: Search

From: "Brett W(dot) McCoy" <bmccoy(at)chapelperilous(dot)net>
To: "Sebastian --[ www(dot)flashhilfe(dot)de ]--" <hallogammler(at)aol(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Search
Date: 2001-02-06 14:09:55
Message-ID: Pine.LNX.4.30.0102060905260.5205-100000@chapelperilous.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Mon, 5 Feb 2001, Sebastian --[ www.flashhilfe.de ]-- wrote:

> I have make a search machine whit:
>
> LIKE '%$suchbegriffe[$i]%'
>
> but when I search Test - the search machine shows only entries
> whit Test. But not test or tESt.

LIKE is case-sensitive. You should convert your column to uppercase:

WHERE UPPER(field) LIKE ...

or use case-insensitive regular expression:

WHERE field ~* '<regexp>'

-- Brett
http://www.chapelperilous.net/~bmccoy/
---------------------------------------------------------------------------
The Angels want to wear my red shoes.
-- E. Costello

In response to

  • Search at 2001-02-05 21:21:51 from Sebastian --[ www.flashhilfe.de ]--

Browse pgsql-sql by date

  From Date Subject
Next Message Brice Ruth 2001-02-06 15:57:53 Re: SQL Join - MySQL/PostgreSQL difference?
Previous Message Sebastian 2001-02-06 13:47:48 Re: Search