Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 11AD2475AD7 for ; Tue, 22 Oct 2002 00:29:12 -0400 (EDT) Received: from secure.pghoster.com (unknown [64.246.32.44]) by postgresql.org (Postfix) with ESMTP id 8FE30475458 for ; Tue, 22 Oct 2002 00:29:11 -0400 (EDT) Received: from pghoster.com (12-239-205-22.client.attbi.com [12.239.205.22]) (authenticated (0 bits)) by secure.pghoster.com (8.11.6/8.11.6) with ESMTP id g9M4S0u24114; Mon, 21 Oct 2002 23:28:01 -0500 Message-ID: <3DB4D3EB.8070201@pghoster.com> Date: Mon, 21 Oct 2002 23:28:27 -0500 From: Roj Niyogi User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Zhidian Du Cc: pgsql-php@postgresql.org Subject: Re: search/select case-insensitivly. References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/45 X-Sequence-Number: 1560 On the PostgreSQL function side of things, you could do: SELECT name FROM mytable WHERE Name ILIKE('$Name'); Hope this helps! :) Cheers, Roj Niyogi niyogi@pghoster.com pgHoster - PostgreSQL Web Hosting http://www.pghoster.com Zhidian Du wrote: > I want a PHP program to search case-insensitivly. > > for example: > select Name from mytable where Name = '$Name'; > > > Here $Name is what users' input maybe JOHN, john. How to let it match > John in table and find that record? > > > Thanks. > > Zhidian Du > > > > > > _________________________________________________________________ > Surf the Web without missing calls! Get MSN Broadband. > http://resourcecenter.msn.com/access/plans/freeactivation.asp > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org