X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id CEBEDD1B8AE for ; Wed, 3 Sep 2003 23:18:10 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 57161-09 for ; Wed, 3 Sep 2003 20:17:41 -0300 (ADT) Received: from mailav.tor1.inquent.com (mail.inquent.com [216.208.117.106]) by svr1.postgresql.org (Postfix) with ESMTP id C7943D1B976 for ; Wed, 3 Sep 2003 20:17:38 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by mailav.tor1.inquent.com (Postfix) with ESMTP id A6ABD1024D; Wed, 3 Sep 2003 19:09:36 -0400 (EDT) Received: from [192.168.1.200] (dyn-133-83.tor.dsl.tht.net [134.22.133.83]) by mailav.tor1.inquent.com (Postfix) with ESMTP id 72F2010248; Wed, 3 Sep 2003 19:09:34 -0400 (EDT) Subject: Re: Case sensitivity when searching for and displaying data From: Rod Taylor To: Lynna Landstreet Cc: pgsql-php@postgresql.org In-Reply-To: References: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-K7jAqf9El2N0LwJSKX3Z" Message-Id: <1062631083.84626.2.camel@jester> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Wed, 03 Sep 2003 19:18:04 -0400 X-Virus-Scanned: by AMaViS perl-11 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/10 X-Sequence-Number: 2287 --=-K7jAqf9El2N0LwJSKX3Z Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Wed, 2003-09-03 at 18:31, Lynna Landstreet wrote: > Hello, >=20 > 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. >=20 > 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) =3D upper('search value'); > Secondly, the case sensitivity thing is also messing up the order of the SELECT * FROM table ORDER BY upper(column); --=-K7jAqf9El2N0LwJSKX3Z Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQA/Vnar6DETLow6vwwRAijLAJ9qyQOpOz3uxn7jnj+Cd8f2tJfHrwCgg+Vi 4tY69V82B2th2EwzEj983Tk= =ZoFp -----END PGP SIGNATURE----- --=-K7jAqf9El2N0LwJSKX3Z--