pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rod Taylor <rbt@rbt.ca>
To: Lynna Landstreet <lynna@gallery44.org>
Cc: pgsql-php@postgresql.org
Subject: Re: Case sensitivity when searching for and displaying data
Date: Wed, 03 Sep 2003 19:18:04 -0400
Message-ID: <1062631083.84626.2.camel@jester> (raw)
In-Reply-To: <BB7BE411.AB4%lynna@gallery44.org>
References: <BB7BE411.AB4%lynna@gallery44.org>

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);

Attachments:

  signature.asc (application/pgp-signature, 186B) download

view thread (6+ messages)  latest in thread

Message-ID: <1062631083.84626.2.camel@jester>
Permalink:  ../1062631083.84626.2.camel@jester/
Also on:    postgresql.org/message-id/1062631083.84626.2.camel@jester

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: rbt@rbt.ca, lynna@gallery44.org
  Subject: Re: Case sensitivity when searching for and displaying data
  In-Reply-To: <1062631083.84626.2.camel@jester>
  References: <BB7BE411.AB4%lynna@gallery44.org> <1062631083.84626.2.camel@jester>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox