Received: from localhost (scrappy@localhost) by hub.org (8.8.8/8.7.5) with SMTP id NAA01687; Tue, 26 May 1998 13:34:33 -0400 (EDT) Date: Tue, 26 May 1998 13:34:33 -0400 (EDT) From: The Hermit Hacker To: "Dana M. Epp" cc: pgsql-sql@postgreSQL.org Subject: Re: [SQL] Doing case-insensitive queries. In-Reply-To: <356AFAD2.23A33F4D@netmaster.ca> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 26 May 1998, Dana M. Epp wrote: > I am trying to query a database case-insenstively on a char() field, and > failing miserably. Could anyone direct me to some documentation that > properly explains how to accomplish such a task in PostgreSQL. > > Items like ~* don't work when using the LIKE for me. > > Here is my current code segment on how I am doing this query with case > sensitivity. > > > $qstring = "select * from $database where vendor LIKE > \'\%$inqstring\%\' ; "; > > $result = $con->exec($qstring); > > Can anyone tell me how I could query that without case-sensitivity? select * from $database where vendor *~ '$inqstring'; I might have that *~ backwards...if that fails, try ~* :(