Skip site navigation (1) Skip section navigation (2)

Re: Case sensitivity when searching for and displaying data

From: Rod Taylor <rbt(at)rbt(dot)ca>
To: Lynna Landstreet <lynna(at)gallery44(dot)org>
Cc: pgsql-php(at)postgresql(dot)org
Subject: Re: Case sensitivity when searching for and displaying data
Date: 2003-09-03 23:18:04
Message-ID: 1062631083.84626.2.camel@jester (view raw or flat)
Thread:
Lists: pgsql-php
On Wed, 2003-09-03 at 18:31, Lynna Landstreet wrote:
> Hello,
> 
> I've gotten a simple PHP search page working on the artists database that
> I've been developing these past few months, but I'm running into a few
> problems with PostgreSQL's case sensitivity.
> 
> Ideally I'd like the search text to case insensitive, so that if the user
> enters "jane smith", "Jane Smith" or "JANE SMITH", they'll still find the
> record for Jane Smith. But I'm not sure how to do that.

SELECT * FROM table WHERE upper(column) = upper('search value');

> Secondly, the case sensitivity thing is also messing up the order of the

SELECT * FROM table ORDER BY upper(column);

In response to

pgsql-php by date

Next:From: Robby RussellDate: 2003-09-03 23:20:34
Subject: Re: Case sensitivity when searching for and displaying data
Previous:From: Lynna LandstreetDate: 2003-09-03 22:31:45
Subject: Case sensitivity when searching for and displaying data

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group